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();
|
// qDebug() << "updateLegend" << graphics.size();
|
||||||
leg_update = false;
|
leg_update = false;
|
||||||
int ps = 100;
|
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++) {
|
for (int i = 0; i < graphics.size(); i++) {
|
||||||
while (!graphics[i].pb->actions().isEmpty()) graphics[i].pb->removeAction(graphics[i].pb->actions()[0]);
|
/*while (!graphics[i].pb->actions().isEmpty()) graphics[i].pb->removeAction(graphics[i].pb->actions()[0]);
|
||||||
delete graphics[i].pb;
|
graphics[i].pb->deleteLater();*/
|
||||||
// qDebug() << "new legend item" << graphics[i].name;
|
// qDebug() << "new legend item" << graphics[i].name;
|
||||||
QPixmap pix(60, 22);
|
QPixmap pix(60, 22);
|
||||||
pix.fill(back_color);
|
pix.fill(back_color);
|
||||||
|
|||||||
Reference in New Issue
Block a user