From: rnv Date: Fri, 17 Jun 2016 13:01:22 +0000 (+0300) Subject: 0023270: [CEA 1822] PARAVIS GUI widgets should be instanciated only when needed:... X-Git-Tag: V8_1_0a1~11 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=10e0da56fa531668d9611190327953536a0c3cf6;p=modules%2Fgui.git 0023270: [CEA 1822] PARAVIS GUI widgets should be instanciated only when needed: Qt4 compatibility. --- diff --git a/src/PVViewer/PVViewer_GUIElements.cxx b/src/PVViewer/PVViewer_GUIElements.cxx index 9e795dc55..6061715ca 100644 --- a/src/PVViewer/PVViewer_GUIElements.cxx +++ b/src/PVViewer/PVViewer_GUIElements.cxx @@ -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; } }