From ebb1a3f11de45f1b49207fa3a9c15756c2684995 Mon Sep 17 00:00:00 2001 From: wmayer Date: Tue, 3 Apr 2012 15:17:23 +0200 Subject: [PATCH] Open transaction before applying transformation --- src/Gui/ManualAlignment.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Gui/ManualAlignment.cpp b/src/Gui/ManualAlignment.cpp index ae4d8e1788..d220922fa9 100644 --- a/src/Gui/ManualAlignment.cpp +++ b/src/Gui/ManualAlignment.cpp @@ -892,10 +892,12 @@ void ManualAlignment::align() // Compute alignment bool ok = computeAlignment(myAlignModel.activeGroup().getPoints(), myFixedGroup.getPoints()); - if (ok) { + if (ok && myDocument) { // Align views + myDocument->openCommand("Align"); for (std::vector::iterator it = pViews.begin(); it != pViews.end(); ++it) alignObject(*it); + myDocument->commitCommand(); // the alignment was successful so show it in the right view now //myAlignModel.activeGroup().setRandomColor();