Skip to content

Commit

Permalink
Fix escape cannot cancel digitizing when CAD dock active
Browse files Browse the repository at this point in the history
Regression caused by qgis#57584
  • Loading branch information
nyalldawson committed Jul 16, 2024
1 parent ba2ff0c commit f564376
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/gui/qgsadvanceddigitizingdockwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1654,7 +1654,7 @@ bool QgsAdvancedDigitizingDockWidget::filterKeyPress( QKeyEvent *e )
{
case Qt::Key_Escape:
{
if ( mConstructionMode && mConstructionGuideLine.numPoints() >= 2 )
if ( type == QEvent::KeyPress && mConstructionMode && mConstructionGuideLine.numPoints() >= 2 )
{
mConstructionGuidesLayer->dataProvider()->deleteFeatures( QgsFeatureIds() << mConstructionGuideId );
mConstructionGuideLine.clear();
Expand All @@ -1665,6 +1665,11 @@ bool QgsAdvancedDigitizingDockWidget::filterKeyPress( QKeyEvent *e )
}

updateCadPaintItem();
e->accept();
}
else
{
e->ignore();
}
break;
}
Expand Down

0 comments on commit f564376

Please sign in to comment.