Skip to content

Commit 145a9e5

Browse files
author
wonder
committed
Fixed crash when adding layer to a group (second part of #2073)
git-svn-id: http://svn.osgeo.org/qgis/trunk@12067 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 3570ad4 commit 145a9e5

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/app/legend/qgslegendgroup.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ QgsLegendItem::DRAG_ACTION QgsLegendGroup::accept( const QgsLegendItem* li ) con
9595
return NO_ACTION;
9696
}
9797

98-
/*bool QgsLegendGroup::insert( QgsLegendItem* theItem )
98+
bool QgsLegendGroup::insert( QgsLegendItem* theItem )
9999
{
100100
if ( theItem->type() == LEGEND_LAYER )
101101
{
@@ -105,7 +105,7 @@ QgsLegendItem::DRAG_ACTION QgsLegendGroup::accept( const QgsLegendItem* li ) con
105105
// XXX - mloskot - I don't know what to return
106106
// but this function must return a value
107107
return true;
108-
}*/
108+
}
109109

110110
std::list<QgsLegendLayer*> QgsLegendGroup::legendLayers()
111111
{

src/app/legend/qgslegendgroup.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class QgsLegendGroup : public QgsLegendItem
4040
QgsLegendItem::DRAG_ACTION accept( LEGEND_ITEM_TYPE type );
4141
QgsLegendItem::DRAG_ACTION accept( const QgsLegendItem* li ) const;
4242
bool isLeafNode();
43-
//bool insert( QgsLegendItem* theItem );
43+
bool insert( QgsLegendItem* theItem );
4444
/**Returns all legend layers under this group*/
4545
std::list<QgsLegendLayer*> legendLayers();
4646
/**Goes through all the legendlayers and sets check state to checked/partially checked/unchecked*/

0 commit comments

Comments
 (0)