Skip to content

Commit

Permalink
circular string maptools now react to ESC key
Browse files Browse the repository at this point in the history
  • Loading branch information
SebDieBln committed Dec 21, 2015
1 parent 889422e commit e45603a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/app/qgsmaptooladdcircularstring.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,18 @@ void QgsMapToolAddCircularString::keyPressEvent( QKeyEvent* e )
mShowCenterPointRubberBand = true;
createCenterPointRubberBand();
}

if ( e && e->key() == Qt::Key_Escape )
{
mPoints.clear();
delete mRubberBand;
mRubberBand = nullptr;
delete mTempRubberBand;
mTempRubberBand = nullptr;
removeCenterPointRubberBand();
if ( mParentTool )
mParentTool->keyPressEvent( e );
}
}

void QgsMapToolAddCircularString::keyReleaseEvent( QKeyEvent* e )
Expand Down

0 comments on commit e45603a

Please sign in to comment.