Graphic legend fix
This commit is contained in:
@@ -3,7 +3,7 @@ cmake_policy(SET CMP0017 NEW) # need include() with .cmake
|
||||
project(qad)
|
||||
set(qad_MAJOR 2)
|
||||
set(qad_MINOR 2)
|
||||
set(qad_REVISION 0)
|
||||
set(qad_REVISION 1)
|
||||
set(qad_SUFFIX )
|
||||
set(qad_COMPANY SHS)
|
||||
set(qad_DOMAIN org.SHS)
|
||||
|
||||
@@ -1727,11 +1727,11 @@ void Graphic::updateLegend(bool es) {
|
||||
int cps = graphics[i].pb->sizeHint().width() + 4;
|
||||
if (cps > ps) ps = cps;
|
||||
}
|
||||
int maxcol = qMax<int>(ui->widgetLegend->width() / ps - 1, 1);
|
||||
LegendScrollArea * leg_sa = (LegendScrollArea *)ui->scrollLegend->layout()->itemAt(0)->widget();
|
||||
int maxcol = qMax<int>(leg_sa->width() / ps - 1, 1);
|
||||
int row = 0, col = 0;
|
||||
bool lv = ui->scrollLegend->isVisibleTo(this);
|
||||
ui->scrollLegend->hide();
|
||||
LegendScrollArea * leg_sa = (LegendScrollArea *)ui->scrollLegend->layout()->itemAt(0)->widget();
|
||||
for (int i = 0; i < graphics.size(); i++) {
|
||||
ui->layoutLegend->addWidget(graphics[i].pb,row,col);
|
||||
QCheckBox * check = graphics[i].pb;
|
||||
|
||||
Reference in New Issue
Block a user