Skip to content
Permalink
Browse files

more legend bugfixes

git-svn-id: http://svn.osgeo.org/qgis/trunk@5041 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent
mhugent committed Mar 17, 2006
1 parent 25470f2 commit a87d4e4f2f646d2b0478d319928265323e577265
Showing with 7 additions and 2 deletions.
  1. +7 −2 src/legend/qgslegend.cpp
@@ -969,8 +969,7 @@ bool QgsLegend::readXML(QDomNode& legendnode)
{
QgsLegendPropertyGroup* thePropertyGroup = new QgsLegendPropertyGroup(lastLayer, "Properties");
childelem.attribute("open") == "true" ? expandItem(thePropertyGroup) : collapseItem(thePropertyGroup);
}

}
child = nextDomNode(child);
}
while(!(child.isNull()));
@@ -1142,6 +1141,7 @@ QTreeWidgetItem* QgsLegend::previousSibling(QTreeWidgetItem* item)

QDomNode QgsLegend::nextDomNode(const QDomNode& theNode)
{
//todo: generalise this for arbitrary deep trees
if(!theNode.firstChild().isNull())
{
return (theNode.firstChild());
@@ -1158,6 +1158,10 @@ QDomNode QgsLegend::nextDomNode(const QDomNode& theNode)
{
return (theNode.parentNode().parentNode().nextSibling());
}
else if(!theNode.parentNode().isNull() && !theNode.parentNode().parentNode().isNull() && !theNode.parentNode().parentNode().parentNode().isNull() && !theNode.parentNode().parentNode().parentNode().nextSibling().isNull())
{
return (theNode.parentNode().parentNode().parentNode().nextSibling());
}
else
{
QDomNode nullNode;
@@ -1335,6 +1339,7 @@ void QgsLegend::handleItemChange(QTreeWidgetItem* item, int row)
}
}
mStateOfCheckBoxes[item] = item->checkState(0);
mMapCanvas->setRenderFlag(true);
return;
}

0 comments on commit a87d4e4

Please sign in to comment.
You can’t perform that action at this time.