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 9ec2d1f99b3a6f9c1f4284a490743c33a06761aa
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 9ec2d1f

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