Skip to content
Permalink
Browse files

Add Group button also adds selected layers if >= 2

  • Loading branch information
uclaros authored and nyalldawson committed Mar 15, 2020
1 parent b201655 commit 9276ea8e05f53251d5c03da2e7201565f3d4f78c
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/gui/layertree/qgslayertreeviewdefaultactions.cpp
@@ -222,6 +222,11 @@ void QgsLayerTreeViewDefaultActions::checkAndAllParents()

void QgsLayerTreeViewDefaultActions::addGroup()
{
if ( mView->selectedNodes( true ).count() >= 2 )
{
groupSelected();
return;
}
QgsLayerTreeGroup *group = mView->currentGroupNode();
if ( !group )
group = mView->layerTreeModel()->rootGroup();

0 comments on commit 9276ea8

Please sign in to comment.
You can’t perform that action at this time.