]> SALOME platform Git repositories - modules/superv.git/blobdiff - src/SUPERVGUI/SUPERVGUI_CanvasNode.cxx
Salome HOME
Initial version of files for OCC developers
[modules/superv.git] / src / SUPERVGUI / SUPERVGUI_CanvasNode.cxx
index 273f161e23e90f68ea200e91d5eaa7545b930e42..9a9f5326b386a3a3d5254ce717ecf7616cc4cccf 100644 (file)
@@ -273,8 +273,9 @@ void SUPERVGUI_CanvasNode::sync()
 {
   //MESSAGE("===> SUPERVGUI_CanvasNode::sync() " << myNode->Name() << ", state " << myNode->State());
 
+  const bool isExecuting = myMain->getDataflow()->IsExecuting();
   //if myNode is a MacroNode then set it state to state of its subgraph
-  if (myNode->IsMacro() && myMain->getDataflow()->IsExecuting()) {
+  if ( myNode->IsMacro() && isExecuting ) {
     // get SubGraph from MacroNode
     SUPERV_Graph aMacro = SUPERV::Graph::_narrow(myNode);
     if (!SUPERV_isNull(aMacro)) {
@@ -291,8 +292,15 @@ void SUPERVGUI_CanvasNode::sync()
       }
     }
   }
-  else 
-    getPrs()->setState(myNode->State());
+  else {
+    SUPERV::GraphState aState = myNode->State();
+
+    // asv : 18.11.04 : fix for 6170 : after execution is finished, nodes' status must be reset.
+    if ( !isExecuting && myMain->IsGUIEventLoopFinished() && (aState == SUPERV::DoneState || 
+        aState == SUPERV::KillState || aState == SUPERV::StopState ) )
+       aState = SUPERV::EditingState;
+    getPrs()->setState(aState);
+  }
   
   // update child ports
   const QObjectList* list = children();
@@ -481,6 +489,7 @@ bool SUPERVGUI_CanvasNode::eventFilter( QObject* o, QEvent* e )
 {
   if (o == myBrowseDlg && e->type() == QEvent::Close)
     myBrowseDlg = 0;
+
   return QObject::eventFilter(o, e);
 }