Skip to content
Permalink
Browse files

Merge pull request #2608 from sbrunner/fill-select

Fix fill and select mixage
  • Loading branch information
m-kuhn committed Dec 23, 2015
2 parents a32587b + 409a59f commit 996de715a4f15cf62e7df03af566bfce120a525c
Showing with 22 additions and 8 deletions.
  1. +22 −8 src/app/nodetool/qgsmaptoolnodetool.cpp
@@ -85,9 +85,16 @@ void QgsMapToolNodeTool::createTopologyRubberBands()
if ( !mMoveRubberBands.contains( snapFeatureId ) )
{
QgsGeometryRubberBand* rb = new QgsGeometryRubberBand( mCanvas, feature.geometry()->type() );
rb->setOutlineColor( Qt::blue );
QSettings settings;
QColor color(
settings.value( "/qgis/digitizing/line_color_red", 255 ).toInt(),
settings.value( "/qgis/digitizing/line_color_green", 0 ).toInt(),
settings.value( "/qgis/digitizing/line_color_blue", 0 ).toInt() );
double myAlpha = settings.value( "/qgis/digitizing/line_color_alpha", 30 ).toInt() / 255.0 ;
color.setAlphaF( myAlpha );
rb->setOutlineColor( color );
rb->setBrushStyle( Qt::NoBrush );
rb->setOutlineWidth( 2 );
rb->setOutlineWidth( settings.value( "/qgis/digitizing/line_width", 1 ).toInt() );
QgsAbstractGeometryV2* rbGeom = feature.geometry()->geometry()->clone();
if ( mCanvas->mapSettings().layerTransform( vlayer ) )
rbGeom->transform( *mCanvas->mapSettings().layerTransform( vlayer ) );
@@ -115,9 +122,16 @@ void QgsMapToolNodeTool::canvasMoveEvent( QgsMapMouseEvent* e )
if ( mMoveRubberBands.empty() )
{
QgsGeometryRubberBand* rb = new QgsGeometryRubberBand( mCanvas, mSelectedFeature->geometry()->type() );
rb->setOutlineColor( Qt::blue );
QSettings settings;
QColor color(
settings.value( "/qgis/digitizing/line_color_red", 255 ).toInt(),
settings.value( "/qgis/digitizing/line_color_green", 0 ).toInt(),
settings.value( "/qgis/digitizing/line_color_blue", 0 ).toInt() );
double myAlpha = settings.value( "/qgis/digitizing/line_color_alpha", 30 ).toInt() / 255.0 ;
color.setAlphaF( myAlpha );
rb->setOutlineColor( color );
rb->setBrushStyle( Qt::NoBrush );
rb->setOutlineWidth( 2 );
rb->setOutlineWidth( settings.value( "/qgis/digitizing/line_width", 1 ).toInt() );
QgsAbstractGeometryV2* rbGeom = mSelectedFeature->geometry()->geometry()->clone();
if ( mCanvas->mapSettings().layerTransform( vlayer ) )
rbGeom->transform( *mCanvas->mapSettings().layerTransform( vlayer ) );
@@ -363,10 +377,10 @@ void QgsMapToolNodeTool::updateSelectFeature()

QSettings settings;
QColor color(
settings.value( "/qgis/digitizing/select_color_red", 255 ).toInt(),
settings.value( "/qgis/digitizing/select_color_green", 0 ).toInt(),
settings.value( "/qgis/digitizing/select_color_blue", 0 ).toInt() );
double myAlpha = settings.value( "/qgis/digitizing/select_color_alpha", 30 ).toInt() / 255.0 ;
settings.value( "/qgis/digitizing/fill_color_red", 255 ).toInt(),
settings.value( "/qgis/digitizing/fill_color_green", 0 ).toInt(),
settings.value( "/qgis/digitizing/fill_color_blue", 0 ).toInt() );
double myAlpha = settings.value( "/qgis/digitizing/fill_color_alpha", 30 ).toInt() / 255.0 ;
color.setAlphaF( myAlpha );
mSelectRubberBand->setFillColor( color );

0 comments on commit 996de71

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