Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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.
6 changes: 6 additions & 0 deletions src/app/qgisapp.cpp
Expand Up @@ -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
Expand Down

0 comments on commit 9ec2d1f

Please sign in to comment.