Skip to content

Commit

Permalink
Merge pull request #2337 from stevenmizuno/fix_3400
Browse files Browse the repository at this point in the history
set selection color from project file
  • Loading branch information
nyalldawson committed Oct 13, 2015
2 parents 9556a76 + 07db984 commit 4e5125b
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/app/qgisapp.cpp
Expand Up @@ -4252,6 +4252,11 @@ bool QgisApp::addProject( const QString& projectFile )
QColor myColor = QColor( myRedInt, myGreenInt, myBlueInt );
mMapCanvas->setCanvasColor( myColor ); //this is fill color before rendering starts
QgsDebugMsg( "Canvas background color restored..." );
myRedInt = QgsProject::instance()->readNumEntry( "Gui", "/SelectionColorRedPart", 255 );
myGreenInt = QgsProject::instance()->readNumEntry( "Gui", "/SelectionColorGreenPart", 255 );
myBlueInt = QgsProject::instance()->readNumEntry( "Gui", "/SelectionColorBluePart", 0 );
myColor = QColor( myRedInt, myGreenInt, myBlueInt );
mMapCanvas->setSelectionColor( myColor ); //this is selection color before rendering starts

//load project scales
bool projectScales = QgsProject::instance()->readBoolEntry( "Scales", "/useProjectScales" );
Expand Down Expand Up @@ -9336,12 +9341,6 @@ void QgisApp::projectProperties()
// Display the modal dialog box.
pp->exec();

int myRedInt = QgsProject::instance()->readNumEntry( "Gui", "/CanvasColorRedPart", 255 );
int myGreenInt = QgsProject::instance()->readNumEntry( "Gui", "/CanvasColorGreenPart", 255 );
int myBlueInt = QgsProject::instance()->readNumEntry( "Gui", "/CanvasColorBluePart", 255 );
QColor myColor = QColor( myRedInt, myGreenInt, myBlueInt );
mMapCanvas->setCanvasColor( myColor ); // this is fill color before rendering onto canvas

qobject_cast<QgsMeasureTool*>( mMapTools.mMeasureDist )->updateSettings();
qobject_cast<QgsMeasureTool*>( mMapTools.mMeasureArea )->updateSettings();
qobject_cast<QgsMapToolMeasureAngle*>( mMapTools.mMeasureAngle )->updateSettings();
Expand Down

0 comments on commit 4e5125b

Please sign in to comment.