Skip to content

Commit

Permalink
Fix 'hide all layers' UX
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvn authored and nyalldawson committed Oct 23, 2020
1 parent c024c52 commit e5ab8ef
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/app/qgisapp.cpp
Expand Up @@ -4714,8 +4714,8 @@ void QgisApp::about()
}
else
{
versionString += QStringLiteral( "</td><td><a href=\"https://github.com/qgis/QGIS/tree/release-%1_%2\">Release %1.%2</a></td>" )
.arg( Qgis::QGIS_VERSION_INT / 10000 ).arg( Qgis::QGIS_VERSION_INT / 100 % 100 );
versionString += QStringLiteral( "</td><td><a href=\"https://github.com/qgis/QGIS/tree/release-%1_%2\">Release %1.%2</a></td>" )
.arg( Qgis::QGIS_VERSION_INT / 10000 ).arg( Qgis::QGIS_VERSION_INT / 100 % 100 );
}
}
else
Expand Down Expand Up @@ -7169,8 +7169,12 @@ void QgisApp::stopRendering()
void QgisApp::hideAllLayers()
{
QgsDebugMsg( QStringLiteral( "hiding all layers!" ) );
mLayerTreeView->layerTreeModel()->rootGroup()->setItemVisibilityCheckedRecursive( false );

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


Expand Down

0 comments on commit e5ab8ef

Please sign in to comment.