Skip to content
Permalink
Browse files
Make first layer selected on project load
just spare a click
  • Loading branch information
elpaso committed Mar 28, 2018
1 parent 14c057a commit 9ec2d1f
Showing 1 changed file with 6 additions and 0 deletions.
@@ -5591,6 +5591,12 @@ bool QgisApp::addProject( const QString &projectFile )

mActionFilterLegend->setChecked( QgsProject::instance()->readBoolEntry( QStringLiteral( "Legend" ), QStringLiteral( "filterByMap" ) ) );

// Select the first layer
if ( mLayerTreeView->layerTreeModel()->rootGroup()->findLayers().count() > 0 )
{
mLayerTreeView->setCurrentLayer( mLayerTreeView->layerTreeModel()->rootGroup()->findLayers().at( 0 )->layer() );
}

QgsSettings settings;

#ifdef WITH_BINDINGS

0 comments on commit 9ec2d1f

Please sign in to comment.