Skip to content

Commit 629cd7a

Browse files
committed
[layertree] Add expand/collapse all actions to legend menu
1 parent 62e499e commit 629cd7a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/app/qgsapplayertreeviewmenuprovider.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ QMenu* QgsAppLayerTreeViewMenuProvider::createContextMenu()
3333
// global menu
3434
menu->addAction( actions->actionAddGroup( menu ) );
3535

36-
// TODO: expand all, collapse all
36+
menu->addAction( QgsApplication::getThemeIcon( "/mActionExpandTree.png" ), tr( "&Expand All" ), mView, SLOT( expandAll() ) );
37+
menu->addAction( QgsApplication::getThemeIcon( "/mActionCollapseTree.png" ), tr( "&Collapse All" ), mView, SLOT( collapseAll() ) );
38+
3739
// TODO: update drawing order
3840
}
3941
else if ( QgsLayerTreeNode* node = mView->layerTreeModel()->index2node( idx ) )

0 commit comments

Comments
 (0)