Skip to content

Commit

Permalink
Fix #10648 (add layer to the selected group)
Browse files Browse the repository at this point in the history
  • Loading branch information
wonder-sk committed Jun 20, 2014
1 parent 708c64e commit 98959bb
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/app/qgisapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2364,6 +2364,14 @@ void QgisApp::updateNewLayerInsertionPoint()
{
if ( QgsLayerTreeNode* currentNode = mLayerTreeView->currentNode() )
{
// if the insertion point is actually a group, insert new layers into the group
if ( QgsLayerTree::isGroup( currentNode ) )
{
QgsProject::instance()->layerTreeRegistryBridge()->setLayerInsertionPoint( QgsLayerTree::toGroup( currentNode ), 0 );
return;
}

// otherwise just set the insertion point in front of the current node
QgsLayerTreeNode* parentNode = currentNode->parent();
if ( QgsLayerTree::isGroup( parentNode ) )
parentGroup = QgsLayerTree::toGroup( parentNode );
Expand Down

0 comments on commit 98959bb

Please sign in to comment.