We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
qgis
Learn more about funding links in repositories.
Report abuse
There was an error while loading. Please reload this page.
1 parent 708c64e commit 98959bbCopy full SHA for 98959bb
src/app/qgisapp.cpp
@@ -2364,6 +2364,14 @@ void QgisApp::updateNewLayerInsertionPoint()
2364
{
2365
if ( QgsLayerTreeNode* currentNode = mLayerTreeView->currentNode() )
2366
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
2375
QgsLayerTreeNode* parentNode = currentNode->parent();
2376
if ( QgsLayerTree::isGroup( parentNode ) )
2377
parentGroup = QgsLayerTree::toGroup( parentNode );
0 commit comments