git-svn-id: svn://db.shs.com.ru/libs@235 a8b55f48-bf90-11e4-a774-851b48703e85

This commit is contained in:
2017-06-14 20:21:56 +00:00
parent 2ff23db796
commit 395c65142a
2 changed files with 13 additions and 1 deletions

View File

@@ -1356,6 +1356,7 @@ void Graphic::updateLegend() {
for (int i = 0; i < graphics.size(); i++) {
while (!graphics[i].pb->actions().isEmpty()) graphics[i].pb->removeAction(graphics[i].pb->actions()[0]);
delete graphics[i].pb;
//qDebug() << "new legend item" << graphics[i].name;
QPixmap pix(60, 22);
pix.fill(back_color);
QPainter p(&pix);
@@ -1394,6 +1395,16 @@ void Graphic::updateLegend() {
}
void Graphic::updateLegendChecks() {
for (int i = 0; i < graphics.size(); i++) {
if (!graphics[i].pb) continue;
bool pbs = graphics[i].pb->blockSignals(true);
graphics[i].pb->setChecked(graphics[i].visible);
graphics[i].pb->blockSignals(pbs);
}
}
void Graphic::graphicVisibleChange(bool checked) {
if (visible_update) return;
QCheckBox * cb = qobject_cast<QCheckBox*>(sender());