mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-22 00:06:57 -04:00
Make first layer selected on project load
just spare a click
This commit is contained in:
parent
14c057aeff
commit
9ec2d1f99b
@ -5591,6 +5591,12 @@ bool QgisApp::addProject( const QString &projectFile )
|
|||||||
|
|
||||||
mActionFilterLegend->setChecked( QgsProject::instance()->readBoolEntry( QStringLiteral( "Legend" ), QStringLiteral( "filterByMap" ) ) );
|
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;
|
QgsSettings settings;
|
||||||
|
|
||||||
#ifdef WITH_BINDINGS
|
#ifdef WITH_BINDINGS
|
||||||
|
Loading…
x
Reference in New Issue
Block a user