Error message about broken formula show twice if set current pattern piece after

deletion.

--HG--
branch : release
This commit is contained in:
Roman Telezhynskyi 2015-03-03 17:31:18 +02:00
parent c466fc40b4
commit 8f0e5fbd78
2 changed files with 6 additions and 4 deletions

View File

@ -50,7 +50,7 @@ void AddToCalc::undo()
{ {
qCDebug(vUndo)<<"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); doc->setCursor(cursor);
QDomElement calcElement; QDomElement calcElement;
@ -90,7 +90,7 @@ void AddToCalc::redo()
{ {
qCDebug(vUndo)<<"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); doc->setCursor(cursor);
QDomElement calcElement; QDomElement calcElement;

View File

@ -54,7 +54,8 @@ void DelTool::undo()
UndoDeleteAfterSibling(parentNode, siblingId); UndoDeleteAfterSibling(parentNode, siblingId);
emit NeedFullParsing(); 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."; qCDebug(vUndo)<<"Redo.";
//Keep first!
doc->SetCurrentPP(nameActivDraw);//Without this user will not see this change
QDomElement domElement = doc->NodeById(nodeId); QDomElement domElement = doc->NodeById(nodeId);
parentNode.removeChild(domElement); parentNode.removeChild(domElement);
emit NeedFullParsing(); emit NeedFullParsing();
doc->SetCurrentPP(nameActivDraw);
} }