Skip to content

Commit

Permalink
Merge pull request #563 from vinayan/rotateMoveFix
Browse files Browse the repository at this point in the history
[Fix #7625] - rubberbands not visible while rotating/moving point geometries
  • Loading branch information
m-kuhn committed Apr 30, 2013
2 parents 7dc0e51 + 2f9cb93 commit 009ba1b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/app/qgsmaptoolmovefeature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,14 @@ void QgsMapToolMoveFeature::canvasPressEvent( QMouseEvent * e )
mMovedFeatures.clear();
mMovedFeatures << cf.id(); //todo: take the closest feature, not the first one...

mRubberBand = createRubberBand();
mRubberBand = createRubberBand( vlayer->geometryType() );
mRubberBand->setToGeometry( cf.geometry(), vlayer );
}
else
{
mMovedFeatures = vlayer->selectedFeaturesIds();

mRubberBand = createRubberBand();
mRubberBand = createRubberBand( vlayer->geometryType() );
for ( int i = 0; i < vlayer->selectedFeatureCount(); i++ )
{
mRubberBand->addGeometry( vlayer->selectedFeatures()[i].geometry(), vlayer );
Expand Down
4 changes: 2 additions & 2 deletions src/app/qgsmaptoolrotatefeature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,14 +155,14 @@ void QgsMapToolRotateFeature::canvasPressEvent( QMouseEvent * e )
mRotatedFeatures.clear();
mRotatedFeatures << cf.id(); //todo: take the closest feature, not the first one...

mRubberBand = createRubberBand();
mRubberBand = createRubberBand( vlayer->geometryType() );
mRubberBand->setToGeometry( cf.geometry(), vlayer );
}
else
{
mRotatedFeatures = vlayer->selectedFeaturesIds();

mRubberBand = createRubberBand();
mRubberBand = createRubberBand( vlayer->geometryType() );
for ( int i = 0; i < vlayer->selectedFeatureCount(); i++ )
{
mRubberBand->addGeometry( vlayer->selectedFeatures()[i].geometry(), vlayer );
Expand Down

0 comments on commit 009ba1b

Please sign in to comment.