From: vsv Date: Fri, 9 Oct 2015 08:36:41 +0000 (+0300) Subject: Call method setStable inside of transaction X-Git-Tag: V_1.4.0_demo2~10^2~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a9958035274c760e00d75f1e37781f9dfbf9a8ed;p=modules%2Fshaper.git Call method setStable inside of transaction --- diff --git a/src/ModuleBase/ModuleBase_OperationFeature.cpp b/src/ModuleBase/ModuleBase_OperationFeature.cpp index 82f6db270..93c5b6029 100755 --- a/src/ModuleBase/ModuleBase_OperationFeature.cpp +++ b/src/ModuleBase/ModuleBase_OperationFeature.cpp @@ -79,6 +79,9 @@ void ModuleBase_OperationFeature::startOperation() if (!aFeature.get() || !isEditOperation()) return; + if (aFeature.get() && isEditOperation()) + aFeature->setStable(false); + myVisualizedObjects.clear(); // store hidden result features std::list aResults = aFeature->results(); @@ -115,7 +118,6 @@ void ModuleBase_OperationFeature::stopOperation() if (myVisualizedObjects.find(aFeature) != myVisualizedObjects.end()) { aFeature->setDisplayed(false); } - aFeature->setStable(true); if (myVisualizedObjects.size() > 0) Events_Loop::loop()->flush(Events_Loop::loop()->eventByName(EVENT_OBJECT_TO_REDISPLAY)); } @@ -158,7 +160,6 @@ FeaturePtr ModuleBase_OperationFeature::createFeature(const bool theFlushMessage void ModuleBase_OperationFeature::setFeature(FeaturePtr theFeature) { myFeature = theFeature; - myFeature->setStable(false); myIsEditing = true; } @@ -221,7 +222,7 @@ void ModuleBase_OperationFeature::start() aDoc->setCurrentFeature(feature(), false); } - startOperation(); + //Already called startOperation(); emit started(); } @@ -243,6 +244,8 @@ void ModuleBase_OperationFeature::abort() if (aPropertyPanel) aPropertyPanel->cleanContent(); + myFeature->setStable(true); + SessionPtr aMgr = ModelAPI_Session::get(); if (myIsEditing) { DocumentPtr aDoc = aMgr->activeDocument(); @@ -281,6 +284,8 @@ bool ModuleBase_OperationFeature::commit() ModuleBase_IPropertyPanel* aPropertyPanel = propertyPanel(); if (aPropertyPanel) aPropertyPanel->cleanContent(); + + myFeature->setStable(true); SessionPtr aMgr = ModelAPI_Session::get(); /// Set current feature and remeber old current feature