Skip to content

Commit

Permalink
Move toggle action first and fix since 3.6
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso committed Dec 7, 2018
1 parent 7945b57 commit 4654790
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Expand Up @@ -293,7 +293,7 @@ Toggle all items belonging to the same layer as this node.

.. seealso:: :py:func:`uncheckAllItems`

.. versionadded:: 3.4
.. versionadded:: 3.6
%End

};
Expand Down
4 changes: 2 additions & 2 deletions src/app/qgsapplayertreeviewmenuprovider.cpp
Expand Up @@ -476,12 +476,12 @@ QMenu *QgsAppLayerTreeViewMenuProvider::createContextMenu()
// symbology item
if ( symbolNode->flags() & Qt::ItemIsUserCheckable )
{
menu->addAction( QgsApplication::getThemeIcon( QStringLiteral( "/mActionToggleAllLayers.svg" ) ), tr( "&Toggle Items" ),
symbolNode, &QgsSymbolLegendNode::toggleAllItems );
menu->addAction( QgsApplication::getThemeIcon( QStringLiteral( "/mActionShowAllLayers.svg" ) ), tr( "&Show All Items" ),
symbolNode, &QgsSymbolLegendNode::checkAllItems );
menu->addAction( QgsApplication::getThemeIcon( QStringLiteral( "/mActionHideAllLayers.svg" ) ), tr( "&Hide All Items" ),
symbolNode, &QgsSymbolLegendNode::uncheckAllItems );
menu->addAction( QgsApplication::getThemeIcon( QStringLiteral( "/mActionToggleAllLayers.svg" ) ), tr( "&Toggle Items" ),
symbolNode, &QgsSymbolLegendNode::toggleAllItems );
menu->addSeparator();
}

Expand Down
2 changes: 1 addition & 1 deletion src/core/layertree/qgslayertreemodellegendnode.h
Expand Up @@ -268,7 +268,7 @@ class CORE_EXPORT QgsSymbolLegendNode : public QgsLayerTreeModelLegendNode
* Toggle all items belonging to the same layer as this node.
* \see checkAllItems()
* \see uncheckAllItems()
* \since QGIS 3.4
* \since QGIS 3.6
*/
void toggleAllItems();

Expand Down

0 comments on commit 4654790

Please sign in to comment.