git-svn-id: svn://db.shs.com.ru/libs@235 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user