diff --git a/src/Gui/ManualAlignment.cpp b/src/Gui/ManualAlignment.cpp index ae4d8e178..d220922fa 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();