git-svn-id: svn://db.shs.com.ru/libs@246 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -1361,9 +1361,19 @@ void Graphic::updateLegend(bool es) {
|
||||
// qDebug() << "updateLegend" << graphics.size();
|
||||
leg_update = false;
|
||||
int ps = 100;
|
||||
for (int r = 0; r < ui->layoutLegend->rowCount(); ++r)
|
||||
for (int c = 0; c < ui->layoutLegend->columnCount(); ++c) {
|
||||
QLayoutItem * li = ui->layoutLegend->itemAtPosition(r, c);
|
||||
if (!li) continue;
|
||||
if (!li->widget()) continue;
|
||||
while (li->widget()->actions().isEmpty())
|
||||
li->widget()->removeAction(li->widget()->actions()[0]);
|
||||
delete li->widget();
|
||||
}
|
||||
ui->layoutLegend->invalidate();
|
||||
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;
|
||||
/*while (!graphics[i].pb->actions().isEmpty()) graphics[i].pb->removeAction(graphics[i].pb->actions()[0]);
|
||||
graphics[i].pb->deleteLater();*/
|
||||
// qDebug() << "new legend item" << graphics[i].name;
|
||||
QPixmap pix(60, 22);
|
||||
pix.fill(back_color);
|
||||
|
||||
Reference in New Issue
Block a user