Skip to content

Commit 98959bb

Browse files
committedJun 20, 2014
Fix #10648 (add layer to the selected group)
1 parent 708c64e commit 98959bb

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed
 

‎src/app/qgisapp.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2364,6 +2364,14 @@ void QgisApp::updateNewLayerInsertionPoint()
23642364
{
23652365
if ( QgsLayerTreeNode* currentNode = mLayerTreeView->currentNode() )
23662366
{
2367+
// if the insertion point is actually a group, insert new layers into the group
2368+
if ( QgsLayerTree::isGroup( currentNode ) )
2369+
{
2370+
QgsProject::instance()->layerTreeRegistryBridge()->setLayerInsertionPoint( QgsLayerTree::toGroup( currentNode ), 0 );
2371+
return;
2372+
}
2373+
2374+
// otherwise just set the insertion point in front of the current node
23672375
QgsLayerTreeNode* parentNode = currentNode->parent();
23682376
if ( QgsLayerTree::isGroup( parentNode ) )
23692377
parentGroup = QgsLayerTree::toGroup( parentNode );

0 commit comments

Comments
 (0)
Please sign in to comment.