Skip to content
Permalink
Browse files

Merge pull request #2337 from stevenmizuno/fix_3400

set selection color from project file
  • Loading branch information
nyalldawson committed Oct 13, 2015
2 parents 9556a76 + 07db984 commit 4e5125b925fde1a03f37d98c3ddce115443ce427
Showing with 5 additions and 6 deletions.
  1. +5 −6 src/app/qgisapp.cpp
@@ -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" );
@@ -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();

0 comments on commit 4e5125b

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