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

svn_qgis at osgeo.org svn_qgis at osgeo.org
Tue Nov 10 08:25:49 EST 2009


Author: wonder
Date: 2009-11-10 08:25:46 -0500 (Tue, 10 Nov 2009)
New Revision: 12067

Modified:
   trunk/qgis/src/app/legend/qgslegendgroup.cpp
   trunk/qgis/src/app/legend/qgslegendgroup.h
Log:
Fixed crash when adding layer to a group (second part of #2073)


Modified: trunk/qgis/src/app/legend/qgslegendgroup.cpp
===================================================================
--- trunk/qgis/src/app/legend/qgslegendgroup.cpp	2009-11-10 12:53:28 UTC (rev 12066)
+++ trunk/qgis/src/app/legend/qgslegendgroup.cpp	2009-11-10 13:25:46 UTC (rev 12067)
@@ -95,7 +95,7 @@
   return NO_ACTION;
 }
 
-/*bool QgsLegendGroup::insert( QgsLegendItem* theItem )
+bool QgsLegendGroup::insert( QgsLegendItem* theItem )
 {
   if ( theItem->type() == LEGEND_LAYER )
   {
@@ -105,7 +105,7 @@
   // XXX - mloskot - I don't know what to return
   // but this function must return a value
   return true;
-}*/
+}
 
 std::list<QgsLegendLayer*> QgsLegendGroup::legendLayers()
 {

Modified: trunk/qgis/src/app/legend/qgslegendgroup.h
===================================================================
--- trunk/qgis/src/app/legend/qgslegendgroup.h	2009-11-10 12:53:28 UTC (rev 12066)
+++ trunk/qgis/src/app/legend/qgslegendgroup.h	2009-11-10 13:25:46 UTC (rev 12067)
@@ -40,7 +40,7 @@
     QgsLegendItem::DRAG_ACTION accept( LEGEND_ITEM_TYPE type );
     QgsLegendItem::DRAG_ACTION accept( const QgsLegendItem* li ) const;
     bool isLeafNode();
-    //bool insert( QgsLegendItem* theItem );
+    bool insert( QgsLegendItem* theItem );
     /**Returns all legend layers under this group*/
     std::list<QgsLegendLayer*> legendLayers();
     /**Goes through all the legendlayers and sets check state to checked/partially checked/unchecked*/



More information about the QGIS-commit mailing list