Skip to content
Permalink
Browse files
Fix adding groups to empty projects
Closes #6879 again
  • Loading branch information
Sandro Santilli committed Dec 26, 2012
1 parent a92a0d1 commit 816c32bd064f1d8871f194f40bb701c899c5373d
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/app/legend/qgslegend.cpp
@@ -212,7 +212,8 @@ int QgsLegend::addGroup( QString name, bool expand, QTreeWidgetItem* parent )
{
if ( nameEmpty )
name = getUniqueGroupName( tr( "group" ), groups() );
group = new QgsLegendGroup( parent, name );
group = new QgsLegendGroup( this, name );
// TODO: warn if parent != NULL or invisibleRootItem ?
}

QModelIndex groupIndex = indexFromItem( group );

0 comments on commit 816c32b

Please sign in to comment.