]> SALOME platform Git repositories - modules/superv.git/commitdiff
Salome HOME
Fix for bug IPAL11362 : "Gate" ports disappear after redisplaying node with started...
authormkr <mkr@opencascade.com>
Fri, 3 Feb 2006 15:18:47 +0000 (15:18 +0000)
committermkr <mkr@opencascade.com>
Fri, 3 Feb 2006 15:18:47 +0000 (15:18 +0000)
src/SUPERVGUI/SUPERVGUI_Main.cxx
src/SUPERVGUI/SUPERVGUI_Main.h

index cdce9ffc655eb9b41dedd92fc6818c8b48bf636a..bd23eaa0c4e9b5b3950129c588d2a3ecabe89bba 100644 (file)
@@ -88,6 +88,8 @@ SUPERVGUI_Main::SUPERVGUI_Main( SUPERVGraph_ViewFrame* theParent,
   } else {
     init(theDesktop);
   }
+  // mkr : IPAL11362
+  connect(this, SIGNAL(EventToSync()), this, SLOT(onObjectCreatedDeleted()));
 }
 
 void SUPERVGUI_Main::init(SUIT_Desktop* theDesktop) {
@@ -273,13 +275,17 @@ void SUPERVGUI_Main::syncAsync() {
 void SUPERVGUI_Main::execute( char *  theNodeName, SUPERV::GraphState theNodeState ) {
   if (myCurrentView == CANVAS || myCurrentView == CONTROLFLOW) {
     SUPERVGUI_CanvasNode* aNode = (SUPERVGUI_CanvasNode*) myCanvas->child(theNodeName, "SUPERVGUI_CanvasNode");
-    if ( aNode )
+    if ( aNode ) {
       aNode->sync();
+      emit EventToSync(); // mkr : IPAL11362
+    }
   }
   else if (myCurrentView == CANVASTABLE) {
     SUPERVGUI_CanvasCellNode* aNode = (SUPERVGUI_CanvasCellNode*) myArray->child(theNodeName, "SUPERVGUI_CanvasCellNode");
-    if (aNode) 
+    if (aNode) {
       aNode->sync();
+      emit EventToSync(); // mkr : IPAL11362
+    }
   }
 
   // asv : 26.01.05 : Bug PAL7164 : puting out-value to study if the "put_to_Study" flag is set on a 
@@ -1296,15 +1302,6 @@ void SUPERVGUI_Main::checkExecution() {
   }
 }
 
-// mkr : IPAL11362
-/**
- * Update current values on show event
- */
-void SUPERVGUI_Main::showEvent( QShowEvent* theEvent ) {
-  sync();
-  QWidget::showEvent( theEvent );
-}
-
 /**
  * Editing() is to be called by any operation in GUI before modification of a datamodel
  * (add/remove ports or nodes, etc.).  It is used to resolve inconsistancies between 2 data models
index 0a4a4a6ea5a1e9d472cd4f1ee89b7b48f602f95b..146c90f1b07f6851b11e1df8cf2019dd95c4f0d8 100644 (file)
@@ -137,6 +137,7 @@ class SUPERVGUI_Main: public SUPERVGraph_View {
 
   signals:
     void KillMyThread(bool theValue);
+    void EventToSync(); // mkr : IPAL11362
 
   public slots:
     void execute(char * theNodeNode, SUPERV::GraphState theNodeState);
@@ -165,9 +166,6 @@ class SUPERVGUI_Main: public SUPERVGraph_View {
     void chooseData(QListViewItem* item);
     void checkExecution();
 
-  protected:
-    virtual void showEvent( QShowEvent* theEvent ); // mkr : IPAL11362
-
   private:
     void init(SUIT_Desktop* parent);
     void syncNotification();