From 1817e423651c01861813557bc76b69f4aafa4e53 Mon Sep 17 00:00:00 2001 From: mpv Date: Thu, 22 May 2014 15:05:00 +0400 Subject: [PATCH] Nested transactions for sketch. --- src/Model/Model_Document.cpp | 2 +- src/SketchSolver/SketchSolver_ConstraintManager.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Model/Model_Document.cpp b/src/Model/Model_Document.cpp index 37f1a8673..3f0378447 100644 --- a/src/Model/Model_Document.cpp +++ b/src/Model/Model_Document.cpp @@ -179,7 +179,7 @@ void Model_Document::startOperation() myNestedStart = myTransactionsAfterSave; } // new command for this - myDoc->NewCommand(); + myDoc->OpenCommand(); // new command for all subs set::iterator aSubIter = mySubs.begin(); for(; aSubIter != mySubs.end(); aSubIter++) diff --git a/src/SketchSolver/SketchSolver_ConstraintManager.cpp b/src/SketchSolver/SketchSolver_ConstraintManager.cpp index 4a47879fa..a2db1ce05 100644 --- a/src/SketchSolver/SketchSolver_ConstraintManager.cpp +++ b/src/SketchSolver/SketchSolver_ConstraintManager.cpp @@ -82,7 +82,8 @@ void SketchSolver_ConstraintManager::processEvent(const Events_Message* theMessa { boost::shared_ptr aSketch = boost::dynamic_pointer_cast(aUpdateMsg->feature()); - changeWorkplane(aSketch); + if (aSketch) + changeWorkplane(aSketch); return ; } boost::shared_ptr aConstraint = -- 2.39.2