Skip to content

Commit

Permalink
Fix broken 'hide all layers' UX
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvn authored and nyalldawson committed Sep 26, 2020
1 parent a2fb7f3 commit 8d2a0d1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/app/qgisapp.cpp
Expand Up @@ -7928,8 +7928,12 @@ void QgisApp::stopRendering()
void QgisApp::hideAllLayers()
{
QgsDebugMsgLevel( QStringLiteral( "hiding all layers!" ), 3 );
mLayerTreeView->layerTreeModel()->rootGroup()->setItemVisibilityCheckedRecursive( false );

const auto constChildren = mLayerTreeView->layerTreeModel()->rootGroup()->children();
for ( QgsLayerTreeNode *node : constChildren )
{
node->setItemVisibilityCheckedRecursive( false );
}
}

void QgisApp::showAllLayers()
Expand Down

0 comments on commit 8d2a0d1

Please sign in to comment.