commitOperation();
stopOperation();
- emit stopped();
- emit committed();
- // finishOperation has to be after commited because in signal commited
- // there is a modification of attribures (color)
SessionPtr aMgr = ModelAPI_Session::get();
aMgr->finishOperation();
+ // Finish operation has to be before stopped because stopped caused update of Object browser
+ // If it will be done before of cleaning of obsolete objects it will cause crash
+ emit stopped();
+ emit committed();
afterCommitOperation();
#ifdef DEBUG_OPERATION_START
#include "SketchPlugin_Feature.h"
#include <ModelAPI_CompositeFeature.h>
+#include <ModelAPI_Session.h>
#include <GeomAPI_Shape.h>
#include <GeomAPI_AISObject.h>
#include <ModelAPI_Document.h>
aColor = Config_PropManager::color("Visualization", "sketch_entity_color");
}
if (!aColor.empty()) {
- if (theResult.get()) {
+ if (theResult.get() && ModelAPI_Session::get()->isOperation()) {
AttributeIntArrayPtr aColorAttr = theResult->data()->intArray(ModelAPI_Result::COLOR_ID());
aColorAttr->setSize(3);
// Set the color attribute in order do not use default colors in the perasentation object