@@ -85,9 +85,16 @@ void QgsMapToolNodeTool::createTopologyRubberBands()
85
85
if ( !mMoveRubberBands .contains ( snapFeatureId ) )
86
86
{
87
87
QgsGeometryRubberBand* rb = new QgsGeometryRubberBand ( mCanvas , feature.geometry ()->type () );
88
- rb->setOutlineColor ( Qt::blue );
88
+ QSettings settings;
89
+ QColor color (
90
+ settings.value ( " /qgis/digitizing/line_color_red" , 255 ).toInt (),
91
+ settings.value ( " /qgis/digitizing/line_color_green" , 0 ).toInt (),
92
+ settings.value ( " /qgis/digitizing/line_color_blue" , 0 ).toInt () );
93
+ double myAlpha = settings.value ( " /qgis/digitizing/line_color_alpha" , 30 ).toInt () / 255.0 ;
94
+ color.setAlphaF ( myAlpha );
95
+ rb->setOutlineColor ( color );
89
96
rb->setBrushStyle ( Qt::NoBrush );
90
- rb->setOutlineWidth ( 2 );
97
+ rb->setOutlineWidth ( settings. value ( " /qgis/digitizing/line_width " , 1 ). toInt () );
91
98
QgsAbstractGeometryV2* rbGeom = feature.geometry ()->geometry ()->clone ();
92
99
if ( mCanvas ->mapSettings ().layerTransform ( vlayer ) )
93
100
rbGeom->transform ( *mCanvas ->mapSettings ().layerTransform ( vlayer ) );
@@ -115,9 +122,16 @@ void QgsMapToolNodeTool::canvasMoveEvent( QgsMapMouseEvent* e )
115
122
if ( mMoveRubberBands .empty () )
116
123
{
117
124
QgsGeometryRubberBand* rb = new QgsGeometryRubberBand ( mCanvas , mSelectedFeature ->geometry ()->type () );
118
- rb->setOutlineColor ( Qt::blue );
125
+ QSettings settings;
126
+ QColor color (
127
+ settings.value ( " /qgis/digitizing/line_color_red" , 255 ).toInt (),
128
+ settings.value ( " /qgis/digitizing/line_color_green" , 0 ).toInt (),
129
+ settings.value ( " /qgis/digitizing/line_color_blue" , 0 ).toInt () );
130
+ double myAlpha = settings.value ( " /qgis/digitizing/line_color_alpha" , 30 ).toInt () / 255.0 ;
131
+ color.setAlphaF ( myAlpha );
132
+ rb->setOutlineColor ( color );
119
133
rb->setBrushStyle ( Qt::NoBrush );
120
- rb->setOutlineWidth ( 2 );
134
+ rb->setOutlineWidth ( settings. value ( " /qgis/digitizing/line_width " , 1 ). toInt () );
121
135
QgsAbstractGeometryV2* rbGeom = mSelectedFeature ->geometry ()->geometry ()->clone ();
122
136
if ( mCanvas ->mapSettings ().layerTransform ( vlayer ) )
123
137
rbGeom->transform ( *mCanvas ->mapSettings ().layerTransform ( vlayer ) );
@@ -363,10 +377,10 @@ void QgsMapToolNodeTool::updateSelectFeature()
363
377
364
378
QSettings settings;
365
379
QColor color (
366
- settings.value ( " /qgis/digitizing/select_color_red " , 255 ).toInt (),
367
- settings.value ( " /qgis/digitizing/select_color_green " , 0 ).toInt (),
368
- settings.value ( " /qgis/digitizing/select_color_blue " , 0 ).toInt () );
369
- double myAlpha = settings.value ( " /qgis/digitizing/select_color_alpha " , 30 ).toInt () / 255.0 ;
380
+ settings.value ( " /qgis/digitizing/fill_color_red " , 255 ).toInt (),
381
+ settings.value ( " /qgis/digitizing/fill_color_green " , 0 ).toInt (),
382
+ settings.value ( " /qgis/digitizing/fill_color_blue " , 0 ).toInt () );
383
+ double myAlpha = settings.value ( " /qgis/digitizing/fill_color_alpha " , 30 ).toInt () / 255.0 ;
370
384
color.setAlphaF ( myAlpha );
371
385
mSelectRubberBand ->setFillColor ( color );
372
386
0 commit comments