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.";
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;

View file

@ -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);
}