Salome HOME
bugfix: Crash on finishOperation() call from the python console
authorsbh <sergey.belash@opencascade.com>
Thu, 24 Jul 2014 10:18:52 +0000 (14:18 +0400)
committersbh <sergey.belash@opencascade.com>
Thu, 24 Jul 2014 10:18:52 +0000 (14:18 +0400)
src/XGUI/XGUI_Workshop.cpp

index 0ca48658f2fdde9b5e57a5016e1427497a5813ea..419cfc532d367f2fcedc7230c564a592c49a687e 100644 (file)
@@ -329,7 +329,9 @@ void XGUI_Workshop::onFeatureCreatedMsg(const ModelAPI_ObjectUpdatedMessage* the
     ResultPartPtr aPart = boost::dynamic_pointer_cast<ModelAPI_ResultPart>(*aIt);
     if (aPart) {
       aHasPart = true;
-    } else {
+    // If a feature is created from the aplication's python console  
+    // it doesn't stored in the operation mgr and doesn't displayed
+    } else if(myOperationMgr->hasOperation()) {
       ModuleBase_Operation* aOperation = myOperationMgr->currentOperation();
       if (aOperation->hasObject(*aIt)) { // Display only current operation results
         myDisplayer->display(*aIt, false);