From 43bcf4ac2d687f4145caa48e990f746deed6f909 Mon Sep 17 00:00:00 2001 From: Erik Andresen <e.andresen@uni-wuppertal.de> Date: Tue, 11 Oct 2016 10:16:45 +0200 Subject: [PATCH] small change increasing the stability of the undo/redo framework --- forms/mainwindow.ui | 3 --- src/GraphicView.cpp | 4 ++++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/forms/mainwindow.ui b/forms/mainwindow.ui index 95df727..dc0fbe3 100644 --- a/forms/mainwindow.ui +++ b/forms/mainwindow.ui @@ -578,9 +578,6 @@ <property name="toolTip"> <string>Save CognitiveMap</string> </property> - <property name="shortcut"> - <string>Ctrl+S</string> - </property> <property name="visible"> <bool>false</bool> </property> diff --git a/src/GraphicView.cpp b/src/GraphicView.cpp index 6294e88..1a79ff4 100644 --- a/src/GraphicView.cpp +++ b/src/GraphicView.cpp @@ -1169,6 +1169,8 @@ void jpsGraphicsView::Undo() { if (!_undoStack.IsEmpty()) { + emit no_drawing(); + const LineAction recentAction = _undoStack.GetRecentAction(); if (recentAction.GetName()=="LineDeleted") @@ -1196,6 +1198,8 @@ void jpsGraphicsView::Redo() { if (!_redoStack.IsEmpty()) { + emit no_drawing(); + const LineAction recentAction = _redoStack.GetRecentAction(); if (recentAction.GetName()=="LineDeleted") -- GitLab