Fix rotation widget disappears after ctrl-clicking to set anchor point

Fixes #17232
This commit is contained in:
Nyall Dawson 2018-01-21 15:08:05 +10:00 committed by Denis Rouzaud
parent 8a6fcc8eac
commit 912bbe3e5e

View File

@ -167,8 +167,6 @@ void QgsMapToolRotateFeature::canvasMoveEvent( QgsMapMouseEvent *e )
void QgsMapToolRotateFeature::canvasReleaseEvent( QgsMapMouseEvent *e )
{
deleteRotationWidget();
if ( !mCanvas )
{
return;
@ -177,6 +175,7 @@ void QgsMapToolRotateFeature::canvasReleaseEvent( QgsMapMouseEvent *e )
QgsVectorLayer *vlayer = currentVectorLayer();
if ( !vlayer )
{
deleteRotationWidget();
deleteRubberband();
notifyNotVectorLayer();
return;
@ -184,8 +183,7 @@ void QgsMapToolRotateFeature::canvasReleaseEvent( QgsMapMouseEvent *e )
if ( e->button() == Qt::RightButton )
{
deleteRubberband();
mRotationActive = false;
cancel();
return;
}
@ -202,6 +200,8 @@ void QgsMapToolRotateFeature::canvasReleaseEvent( QgsMapMouseEvent *e )
return;
}
deleteRotationWidget();
// Initialize rotation if not yet active
if ( !mRotationActive )
{