Skip to content
Permalink
Browse files

Add better default colour and width for measure tools. Fix #10029

  • Loading branch information
NathanW2 committed Apr 23, 2014
1 parent be18a5e commit 3a726b60858402402be1a6685371123d17412043
Showing with 10 additions and 8 deletions.
  1. +2 −1 src/app/qgsmaptoolmeasureangle.cpp
  2. +5 −4 src/app/qgsmeasuretool.cpp
  3. +3 −3 src/app/qgsoptions.cpp
@@ -133,7 +133,8 @@ void QgsMapToolMeasureAngle::createRubberBand()
int myRed = settings.value( "/qgis/default_measure_color_red", 180 ).toInt();
int myGreen = settings.value( "/qgis/default_measure_color_green", 180 ).toInt();
int myBlue = settings.value( "/qgis/default_measure_color_blue", 180 ).toInt();
mRubberBand->setColor( QColor( myRed, myGreen, myBlue, 65 ) );
mRubberBand->setColor( QColor( myRed, myGreen, myBlue, 100 ) );
mRubberBand->setWidth( 3 );
}

QgsPoint QgsMapToolMeasureAngle::snapPoint( const QPoint& p )
@@ -117,10 +117,11 @@ void QgsMeasureTool::updateSettings()
{
QSettings settings;

int myRed = settings.value( "/qgis/default_measure_color_red", 180 ).toInt();
int myGreen = settings.value( "/qgis/default_measure_color_green", 180 ).toInt();
int myBlue = settings.value( "/qgis/default_measure_color_blue", 180 ).toInt();
mRubberBand->setColor( QColor( myRed, myGreen, myBlue, 65 ) );
int myRed = settings.value( "/qgis/default_measure_color_red", 222 ).toInt();
int myGreen = settings.value( "/qgis/default_measure_color_green", 155 ).toInt();
int myBlue = settings.value( "/qgis/default_measure_color_blue", 67 ).toInt();
mRubberBand->setColor( QColor( myRed, myGreen, myBlue, 100 ) );
mRubberBand->setWidth( 3 );
mDialog->updateSettings();
}

@@ -623,9 +623,9 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl ) :
pbnCanvasColor->setColor( QColor( myRed, myGreen, myBlue ) );

// set the default color for the measure tool
myRed = settings.value( "/qgis/default_measure_color_red", 180 ).toInt();
myGreen = settings.value( "/qgis/default_measure_color_green", 180 ).toInt();
myBlue = settings.value( "/qgis/default_measure_color_blue", 180 ).toInt();
myRed = settings.value( "/qgis/default_measure_color_red", 222 ).toInt();
myGreen = settings.value( "/qgis/default_measure_color_green", 155 ).toInt();
myBlue = settings.value( "/qgis/default_measure_color_blue", 67 ).toInt();
pbnMeasureColor->setColor( QColor( myRed, myGreen, myBlue ) );

capitaliseCheckBox->setChecked( settings.value( "/qgis/capitaliseLayerName", QVariant( false ) ).toBool() );

0 comments on commit 3a726b6

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