Salome HOME
Merge from OCC_development_generic_2006
[modules/superv.git] / src / GraphEditor / DataFlowEditor_DataFlow.lxx
index d793893356a2a37d6ac40595f2b95d579c680252..24f63f6f932c1423e893233dab6e184265c81c0f 100644 (file)
@@ -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() ;