From a2ee7e597c792b71392c909356f1cfed66f5df74 Mon Sep 17 00:00:00 2001 From: Keisuke Inoue Date: Thu, 5 Dec 2024 09:19:05 +0900 Subject: [PATCH] Bugfix: Deleting grid division point cause iRIC GUI crash. #1485 --- .../riversurvey/gridcreatingconditionriversurvey.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libs/gridcreatingcondition/riversurvey/gridcreatingconditionriversurvey.cpp b/libs/gridcreatingcondition/riversurvey/gridcreatingconditionriversurvey.cpp index 50d3a264c..8a753e405 100644 --- a/libs/gridcreatingcondition/riversurvey/gridcreatingconditionriversurvey.cpp +++ b/libs/gridcreatingcondition/riversurvey/gridcreatingconditionriversurvey.cpp @@ -59,7 +59,9 @@ class GridCreatingConditionCtrlPointDeleteCommand : public QUndoCommand {} void undo() { + m_condition->m_mouseEventMode = GridCreatingConditionRiverSurvey::MouseEventMode::meNormal; m_condition->cancelBackgroundGridUpdate(); + for (GeoDataRiverSurveyCtrlPointBackup* backup : m_before) { backup->restore(); } @@ -70,6 +72,7 @@ class GridCreatingConditionCtrlPointDeleteCommand : public QUndoCommand } void redo() { + m_condition->m_mouseEventMode = GridCreatingConditionRiverSurvey::MouseEventMode::meNormal; m_condition->cancelBackgroundGridUpdate(); for (GeoDataRiverSurveyCtrlPointBackup* backup : m_after) { backup->restore();