]> SALOME platform Git repositories - modules/superv.git/commitdiff
Salome HOME
1) fix for bug 8919 - notification mechanism: filtering of messages of external compo...
authorasv <asv@opencascade.com>
Wed, 6 Jul 2005 06:31:21 +0000 (06:31 +0000)
committerasv <asv@opencascade.com>
Wed, 6 Jul 2005 06:31:21 +0000 (06:31 +0000)
2) update of object browser is forced at the end of execution.  why it was not done before (instead - "update WANTED" message)? - don't know.  It caused errors in update.

src/SUPERVGUI/SUPERVGUI_Main.cxx

index 7d4856922f80cae84cab9a4534bd287a620c01c5..239f6ce300aea93257cd692df571e0efb1c9264c 100644 (file)
@@ -1046,8 +1046,10 @@ bool SUPERVGUI_Main::putDataStudy( SUPERV_Port p, const char* inout ) {
   else
     aBuilder->AbortCommand();
   
-  if ( !myThread->running() )
-    MESSAGE("WANTED - study->updateObjBrowser(); ");
+  if ( !myThread->running() ) {
+    getStudy()->updateObjBrowser();
+    //MESSAGE("WANTED - study->updateObjBrowser(); ");
+  }
 
   isIn = false;
   return true;
@@ -1083,16 +1085,16 @@ void SUPERVGUI_Main::syncNotification() {
   char* date;
   long  stamp;
   
-  while (notification->Receive(&graph, &node, &type, &message, &sender, &counter, &date, &stamp)) {
-    if (isFiltered(graph, node, type, message, sender, counter, date, stamp)) {
+  while ( notification->Receive(&graph, &node, &type, &message, &sender, &counter, &date, &stamp) ) {
+//    if (isFiltered(graph, node, type, message, sender, counter, date, stamp)) {
       QString mess("");
       mess += "NOTIF: "; mess += graph;
       mess += " / "    ; mess += node;
       mess += " / "    ; mess += type;
       mess += " / "    ; mess += message;
-      getMessage()->setMessage(mess.latin1());
-    };
-  };
+      getMessage()->setMessage( mess.latin1() );
+//    };
+  } 
 }
   
 bool SUPERVGUI_Main::isFiltered(char* graph,  char* node,   char* type, char* message, 
@@ -1294,6 +1296,9 @@ void SUPERVGUI_Thread::run()
 
     // blocking function of Engine.  Return from there only after anEvent happens on node aNode
     myMain->getDataflow()->Event(aNode, aEvent, aState);
+
+    // in case node "said" something during changing state through notification mechanism - output it
+    myMain->syncNotification();
     
     // "kill" or undefined event came
     if (( aEvent == SUPERV::UndefinedEvent && aState == SUPERV::UndefinedState ) ||