Skip to content
Permalink
Browse files
fix for bug #95: add many tiffs in one turn - the last one is expande…
…d, all the other are collapsed

git-svn-id: http://svn.osgeo.org/qgis/trunk@5497 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed May 29, 2006
1 parent 97a72e4 commit 32c9908ba44a2c0531931faedb481da2ece40776
Showing with 6 additions and 8 deletions.
  1. +0 −1 src/gui/qgisapp.cpp
  2. +6 −7 src/legend/qgslegend.cpp
@@ -1803,7 +1803,6 @@ bool QgisApp::addLayer(QStringList const &theLayerQStringList, const QString& en

// Register this layer with the layers registry
QgsMapLayerRegistry::instance()->addMapLayer(layer);
layer->refreshLegend();

// connect up any keypresses to be passed tot he layer (e.g. so esc can stop rendering)
#ifdef QGISDEBUG
@@ -511,14 +511,11 @@ void QgsLegend::addLayer( QgsMapLayer * layer )
blockSignals(false);

layer->setLegend(this);
//QgsLegendPropertyGroup * lpgroup = new QgsLegendPropertyGroup(llayer,QString("Properties"));
layer->setLegendLayerFile(llfile);
layer->initContextMenu(mApp);

insertTopLevelItem(0, llayer);

setExpanded(indexFromItem(llayer), true);
setExpanded(indexFromItem(llfgroup), false);
setItemExpanded(llayer, true);
setItemExpanded(llfgroup, false);
//only if qsetting for 'legend layer file visible' is not set
if(!mShowLegendLayerFiles)
{
@@ -530,8 +527,10 @@ void QgsLegend::addLayer( QgsMapLayer * layer )
// first layer?
if (mMapCanvas->layerCount() == 1)
mMapCanvas->zoomFullExtent();

setCurrentItem(llayer);
//make the QTreeWidget item up-to-date
doItemsLayout();
layer->refreshLegend();
}

QgsMapLayer* QgsLegend::currentLayer()
@@ -1384,7 +1383,7 @@ void QgsLegend::changeSymbologySettings(const QString& key, const std::list< std
//restore the current item again
setCurrentItem(theCurrentItem);
adjustIconSize();
setExpanded(indexFromItem(theLegendLayer), true);//make sure the symbology items are visible
setItemExpanded(theLegendLayer, true);//make sure the symbology items are visible
}

void QgsLegend::addPixmapWidthValue(int width)

0 comments on commit 32c9908

Please sign in to comment.