Skip to content
Permalink
Browse files

Set Style tab as default on first opening of raster properties

  • Loading branch information
dakcarto committed Apr 13, 2013
1 parent 602f09d commit 2f94d659a076d46513b990cab5ada3bbde215a91
Showing with 9 additions and 3 deletions.
  1. +9 −3 src/app/qgsrasterlayerproperties.cpp
@@ -219,9 +219,6 @@ QgsRasterLayerProperties::QgsRasterLayerProperties( QgsMapLayer* lyr, QgsMapCanv
.arg( pyramidSentence2 ).arg( pyramidSentence3 )
.arg( pyramidSentence4 ).arg( pyramidSentence5 ) );

QSettings settings;
restoreGeometry( settings.value( "/Windows/RasterLayerProperties/geometry" ).toByteArray() );

setWindowTitle( tr( "Layer Properties - %1" ).arg( lyr->name() ) );

tableTransparency->horizontalHeader()->setResizeMode( 0, QHeaderView::Stretch );
@@ -381,6 +378,15 @@ QgsRasterLayerProperties::QgsRasterLayerProperties( QgsMapLayer* lyr, QgsMapCanv
// update based on lyr's current state
sync();

QSettings settings;
// if dialog hasn't been opened/closed yet, default to Styles tab, which is used most often
// this will be read by restoreOptionsBaseUi()
if ( !settings.contains( QString( "/Windows/RasterLayerProperties/tab" ) ) )
{
settings.setValue( QString( "/Windows/RasterLayerProperties/tab" ),
mOptStackedWidget->indexOf( mOptsPage_Style ) );
}

restoreOptionsBaseUi();
} // QgsRasterLayerProperties ctor

0 comments on commit 2f94d65

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