[QGIS Commit] r11022 - trunk/qgis/src/app/legend

svn_qgis at osgeo.org svn_qgis at osgeo.org
Sat Jul 4 16:34:16 EDT 2009


Author: jef
Date: 2009-07-04 16:34:16 -0400 (Sat, 04 Jul 2009)
New Revision: 11022

Modified:
   trunk/qgis/src/app/legend/qgslegend.cpp
   trunk/qgis/src/app/legend/qgslegendlayer.cpp
Log:
fix #1045

Modified: trunk/qgis/src/app/legend/qgslegend.cpp
===================================================================
--- trunk/qgis/src/app/legend/qgslegend.cpp	2009-07-04 20:12:23 UTC (rev 11021)
+++ trunk/qgis/src/app/legend/qgslegend.cpp	2009-07-04 20:34:16 UTC (rev 11022)
@@ -1,4 +1,3 @@
-
 /***************************************************************************
                           qgslegend.cpp  -  description
                              -------------------
@@ -89,16 +88,11 @@
   header()->setHidden( 1 );
   setRootIsDecorated( true );
   initPixmaps();
-
-
 }
 
-
-
 QgsLegend::~QgsLegend()
 {}
 
-
 void QgsLegend::handleCurrentItemChanged( QTreeWidgetItem* current, QTreeWidgetItem* previous )
 {
   QgsMapLayer *layer = currentLayer();
@@ -551,8 +545,8 @@
   doItemsLayout();
 
   // setup connections that will update the layer icons
-  connect(layer, SIGNAL(editingStarted()), llayer, SLOT(updateIcon()));
-  connect(layer, SIGNAL(editingStopped()), llayer, SLOT(updateIcon()));
+  connect( layer, SIGNAL( editingStarted() ), llayer, SLOT( updateIcon() ) );
+  connect( layer, SIGNAL( editingStopped() ), llayer, SLOT( updateIcon() ) );
 }
 
 QgsLegendLayerFile* QgsLegend::currentLayerFile()
@@ -1563,7 +1557,6 @@
     return;
   }
 
-  closePersistentEditor( item, row );
   //if the text of a QgsLegendLayer has changed, change the display names of all its maplayers
   QgsLegendLayer* theLegendLayer = dynamic_cast<QgsLegendLayer*>( item ); //item is a legend layer
   if ( theLegendLayer )
@@ -1705,7 +1698,7 @@
   QTreeWidgetItem* theItem = currentItem();
   if ( theItem )
   {
-    openPersistentEditor( theItem, 0 );
+    editItem( theItem, 0 );
   }
 }
 

Modified: trunk/qgis/src/app/legend/qgslegendlayer.cpp
===================================================================
--- trunk/qgis/src/app/legend/qgslegendlayer.cpp	2009-07-04 20:12:23 UTC (rev 11021)
+++ trunk/qgis/src/app/legend/qgslegendlayer.cpp	2009-07-04 20:34:16 UTC (rev 11022)
@@ -400,7 +400,6 @@
   QPixmap newIcon( getOriginalPixmap() );
 
   QgsMapLayer* theLayer = firstMapLayer();
-  QgsLegendLayerFile* theFile = firstLayerFile();
 
   if ( mapLayers().size() == 1 )
   {



More information about the QGIS-commit mailing list