File tree 1 file changed +7
-2
lines changed
1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -969,8 +969,7 @@ bool QgsLegend::readXML(QDomNode& legendnode)
969
969
{
970
970
QgsLegendPropertyGroup* thePropertyGroup = new QgsLegendPropertyGroup (lastLayer, " Properties" );
971
971
childelem.attribute (" open" ) == " true" ? expandItem (thePropertyGroup) : collapseItem (thePropertyGroup);
972
- }
973
-
972
+ }
974
973
child = nextDomNode (child);
975
974
}
976
975
while (!(child.isNull ()));
@@ -1142,6 +1141,7 @@ QTreeWidgetItem* QgsLegend::previousSibling(QTreeWidgetItem* item)
1142
1141
1143
1142
QDomNode QgsLegend::nextDomNode (const QDomNode& theNode)
1144
1143
{
1144
+ // todo: generalise this for arbitrary deep trees
1145
1145
if (!theNode.firstChild ().isNull ())
1146
1146
{
1147
1147
return (theNode.firstChild ());
@@ -1158,6 +1158,10 @@ QDomNode QgsLegend::nextDomNode(const QDomNode& theNode)
1158
1158
{
1159
1159
return (theNode.parentNode ().parentNode ().nextSibling ());
1160
1160
}
1161
+ else if (!theNode.parentNode ().isNull () && !theNode.parentNode ().parentNode ().isNull () && !theNode.parentNode ().parentNode ().parentNode ().isNull () && !theNode.parentNode ().parentNode ().parentNode ().nextSibling ().isNull ())
1162
+ {
1163
+ return (theNode.parentNode ().parentNode ().parentNode ().nextSibling ());
1164
+ }
1161
1165
else
1162
1166
{
1163
1167
QDomNode nullNode;
@@ -1335,6 +1339,7 @@ void QgsLegend::handleItemChange(QTreeWidgetItem* item, int row)
1335
1339
}
1336
1340
}
1337
1341
mStateOfCheckBoxes [item] = item->checkState (0 );
1342
+ mMapCanvas ->setRenderFlag (true );
1338
1343
return ;
1339
1344
}
1340
1345
You can’t perform that action at this time.
0 commit comments