Skip to content

Commit

Permalink
Work around for ticket #405 (incorrect drawing of expanded file groups
Browse files Browse the repository at this point in the history
in the legen). Not sure why it works...


git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@6163 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
g_j_m committed Dec 1, 2006
1 parent 20cc4ef commit 4b3c462
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/legend/qgslegend.cpp
Expand Up @@ -1662,11 +1662,17 @@ void QgsLegend::showLegendLayerFileGroups()


do do
{ {
// This call seems to fix a bug in Qt4.2 (qgis trac #405) whereby the
// setHidden() call in the if statement below doesn't result in
// correct drawing of the visible file group part of the tree,
// but doing this setHidden() call does result in correct drawing.
theItem->setHidden(false);

theFileGroup = dynamic_cast<QgsLegendLayerFileGroup*>(theItem); theFileGroup = dynamic_cast<QgsLegendLayerFileGroup*>(theItem);
if(theFileGroup) if(theFileGroup)
{ {
theFileGroup->setHidden(!mShowLegendLayerFiles); theFileGroup->setHidden(!mShowLegendLayerFiles);
} }
} }
while(theItem = nextItem(theItem)); while(theItem = nextItem(theItem));
} }
Expand Down

0 comments on commit 4b3c462

Please sign in to comment.