Skip to content
Permalink
Browse files

Merge pull request #6698 from elpaso/auto-select-first-layer-on-load

Make first layer selected on project load
  • Loading branch information
elpaso committed Mar 28, 2018
2 parents 93a6115 + 9ec2d1f commit cc7c9356bc3915bb5c6a17d95b5c5f183771bd5a
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/app/qgisapp.cpp
@@ -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 cc7c935

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