Skip to content
Permalink
Browse files

Move toggle action first and fix since 3.6

  • Loading branch information
elpaso committed Dec 7, 2018
1 parent 7945b57 commit 465479056ddc2a296a782043c3c891036d161bd5
@@ -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

};
@@ -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();
}

@@ -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();

0 comments on commit 4654790

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