]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
0023270: [CEA 1822] PARAVIS GUI widgets should be instanciated only when needed:...
authorrnv <rnv@opencascade.com>
Fri, 17 Jun 2016 13:01:22 +0000 (16:01 +0300)
committerrnv <rnv@opencascade.com>
Fri, 17 Jun 2016 13:01:22 +0000 (16:01 +0300)
src/PVViewer/PVViewer_GUIElements.cxx

index 9e795dc55e7728725a872f2bef38eb73701f73d8..6061715ca51860a3e9a84972c263b785dd714d42 100644 (file)
@@ -186,17 +186,31 @@ void PVViewer_GUIElements::buildPVWidgets()
         applyBehavior->registerPanel(ppanel);
       }
     
-    emit pqActiveObjects::instance().portChanged(pqActiveObjects::instance().activePort());
-    emit pqActiveObjects::instance().viewChanged(pqActiveObjects::instance().activeView()); 
+    QMetaObject::invokeMethod( &pqActiveObjects::instance(),
+                              "portChanged",
+                              Qt::AutoConnection,
+                              Q_ARG( pqOutputPort*, pqActiveObjects::instance().activePort() ) );
+    
+    QMetaObject::invokeMethod( &pqActiveObjects::instance(),
+                              "viewChanged",
+                              Qt::AutoConnection,
+                              Q_ARG( pqView*, pqActiveObjects::instance().activeView() ) ); 
 
     pqServerManagerModel *smModel = pqApplicationCore::instance()->getServerManagerModel();
     pqServer* serv = pqActiveObjects::instance().activeServer();    
 
     if (serv) {
-      emit smModel->serverAdded(serv);
-      emit serv->nameChanged(NULL);
+      QMetaObject::invokeMethod( smModel,
+                                "serverAdded",
+                                Qt::AutoConnection,
+                                Q_ARG( pqServer*, serv ) );
+      
+      QMetaObject::invokeMethod( serv,
+                                "nameChanged",
+                                Qt::AutoConnection,
+                                Q_ARG( pqServerManagerModelItem* , NULL ) );
     }
-
+    
     myPVWidgetsFlag = true;
   }
 }