diff --git a/src/app/undocommands/addtocalc.cpp b/src/app/undocommands/addtocalc.cpp index dbe3799cf..47c35915f 100644 --- a/src/app/undocommands/addtocalc.cpp +++ b/src/app/undocommands/addtocalc.cpp @@ -50,7 +50,7 @@ void AddToCalc::undo() { qCDebug(vUndo)<<"Undo."; - doc->ChangeActivPP(nameActivDraw);//User will not see this change + doc->ChangeActivPP(nameActivDraw);//Without this user will not see this change doc->setCursor(cursor); QDomElement calcElement; @@ -90,7 +90,7 @@ void AddToCalc::redo() { qCDebug(vUndo)<<"Redo."; - doc->ChangeActivPP(nameActivDraw);//User will not see this change + doc->ChangeActivPP(nameActivDraw);//Without this user will not see this change doc->setCursor(cursor); QDomElement calcElement; diff --git a/src/app/undocommands/deltool.cpp b/src/app/undocommands/deltool.cpp index 762624174..1aff2a436 100644 --- a/src/app/undocommands/deltool.cpp +++ b/src/app/undocommands/deltool.cpp @@ -54,7 +54,8 @@ void DelTool::undo() UndoDeleteAfterSibling(parentNode, siblingId); emit NeedFullParsing(); - doc->SetCurrentPP(nameActivDraw); + //Keep last! + doc->SetCurrentPP(nameActivDraw);//Without this user will not see this change } //--------------------------------------------------------------------------------------------------------------------- @@ -62,8 +63,9 @@ void DelTool::redo() { qCDebug(vUndo)<<"Redo."; + //Keep first! + doc->SetCurrentPP(nameActivDraw);//Without this user will not see this change QDomElement domElement = doc->NodeById(nodeId); parentNode.removeChild(domElement); emit NeedFullParsing(); - doc->SetCurrentPP(nameActivDraw); }