use digitizing color for label editing rubber band

This commit is contained in:
Denis Rouzaud 2016-01-27 15:40:21 +01:00
parent ae3cfd4f85
commit d80a632bd8

View File

@ -86,8 +86,13 @@ void QgsMapToolLabel::createRubberBands()
const QgsGeometry* geom = f.constGeometry();
if ( geom )
{
QSettings settings;
int r = settings.value( "/qgis/digitizing/line_color_red", 255 ).toInt();
int g = settings.value( "/qgis/digitizing/line_color_green", 0 ).toInt();
int b = settings.value( "/qgis/digitizing/line_color_blue", 0 ).toInt();
int a = settings.value( "/qgis/digitizing/line_color_alpha", 200 ).toInt();
mFeatureRubberBand = new QgsRubberBand( mCanvas, geom->type() );
mFeatureRubberBand->setColor( QColor( 255, 0, 0, 65 ) );
mFeatureRubberBand->setColor( QColor( r, g, b, a ) );
mFeatureRubberBand->setToGeometry( geom, vlayer );
mFeatureRubberBand->show();
}