Salome HOME
small debug
[modules/yacs.git] / src / engine / ElementaryNode.cxx
index c92608532737687451e29f7c29a21699adb380c7..129deaa1d701bbbc0466d8e007ea257854cb7697 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2006-2015  CEA/DEN, EDF R&D
+// Copyright (C) 2006-2016  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -92,17 +92,17 @@ void ElementaryNode::initCommonPartWithoutStateManagement(bool start)
   for(list<InputPort *>::iterator iter2=_setOfInputPort.begin();iter2!=_setOfInputPort.end();iter2++)
     (*iter2)->exInit(start);
   _inGate.exReset();
-  if(_state == YACS::DISABLED)
-    {
-      exDisabledState(); // to refresh propagation of DISABLED state
-      return;
-    }
 }
 
 void ElementaryNode::init(bool start)
 {
   DEBTRACE("ElementaryNode::init " << getName() << " " << start << " " << _state);
   initCommonPartWithoutStateManagement(start);
+  if(_state == YACS::DISABLED)
+    {
+      exDisabledState(); // to refresh propagation of DISABLED state
+      return ;
+    }
   setState(YACS::READY);
 }