Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix adding groups to empty projects
Closes #6879 again
  • Loading branch information
Sandro Santilli committed Dec 26, 2012
1 parent a92a0d1 commit 816c32b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/legend/qgslegend.cpp
Expand Up @@ -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 );
Expand Down

0 comments on commit 816c32b

Please sign in to comment.