Salome HOME
Merge from OCC_development_generic_2006
[modules/superv.git] / src / GraphEditor / DataFlowEditor_DataFlow.lxx
index 38bf1ab629e7b871c8d4c11622119b7a1554d9f8..24f63f6f932c1423e893233dab6e184265c81c0f 100644 (file)
@@ -327,7 +327,7 @@ inline bool GraphEditor::DataFlow::ChangeLinkCoord(
                          const int index ,
                          const int X ,
                          const int Y ) {
-  _EditedAfterExecution = true ;
+  //_EditedAfterExecution = true ; // mkr : fix for bug IPAL9818
   return GraphEditor::OutNode::ChangeLinkCoord( FromNodeName ,
                                                 FromServiceParameterName ,
                                                 ToNodeName ,
@@ -476,7 +476,11 @@ inline bool GraphEditor::DataFlow::IsReadOnly() {
 
 inline long GraphEditor::DataFlow::LevelMax() {
 //  if ( !IsValid( false ) ) {
-  if ( !IsExecutable() ) {
+//  if ( !IsExecutable() ) {
+  // mkr : IPAL9974 -->
+  int SubStreamGraphsNumber = 0 ;
+  if ( !IsValid() || !Graph()->Sort( SubStreamGraphsNumber ) ) {
+  // mkr : IPAL9974 <-- 
     return 0 ;
   }
   return Graph()->LevelMax() ;
@@ -484,7 +488,8 @@ inline long GraphEditor::DataFlow::LevelMax() {
 
 inline SUPERV::ListOfStrings * GraphEditor::DataFlow::LevelNodes(long aLevel ) {
 //  if ( !IsValid( false ) ) {
-  if ( !IsExecutable() ) {
+//  if ( !IsExecutable() ) {
+  if ( !IsValid() ) { // mkr : IPAL9974
     return ((SUPERV::ListOfStrings * ) NULL ) ;
   }
   return Graph()->LevelNodes( aLevel ) ;
@@ -492,7 +497,11 @@ inline SUPERV::ListOfStrings * GraphEditor::DataFlow::LevelNodes(long aLevel ) {
 
 inline long GraphEditor::DataFlow::ThreadsMax() {
 //  if ( !IsValid() ) {
-  if ( !IsExecutable() ) {
+//  if ( !IsExecutable() ) {
+  // mkr : IPAL9974 -->
+  int SubStreamGraphsNumber = 0 ;      
+  if ( !IsValid()  || !Graph()->Sort( SubStreamGraphsNumber ) ) {
+  // mkr : IPAL9974 <--
     return 0 ;
   }
   return Graph()->ThreadsMax() ;