#include <pqServerResource.h>
#include <pqServerConnectReaction.h>
+// TO REMOVE:
+#include <PyInterp_Interp.h>
+
+
//----------------------------------------------------------------------------
PVGUI_Module* ParavisModule = 0;
if(!isStop)
{
// Start a timer to schedule asap:
- // - the connection to the server
// - the trace start
myInitTimer = new QTimer(aDesktop);
QObject::connect(myInitTimer, SIGNAL(timeout()), this, SLOT(onInitTimer()) );
}
/*!
- \brief Initialisation timer event - fired only once, after the GUI loop is ready.
- See creation in initialize().
+ \brief Initialisation timer event - trace start up
*/
void PVGUI_Module::onInitTimer()
{
-#ifndef PARAVIS_WITH_FULL_CORBA
-// connectToExternalPVServer();
-#endif
startTrace();
}
int aParaVisSettingsTab = addPreference( tr( "TIT_PVISSETTINGS" ) );
addPreference( tr( "PREF_STOP_TRACE" ), aParaVisSettingsTab, LightApp_Preferences::Bool, "PARAVIS", "stop_trace");
+ addPreference( tr( "PREF_NO_EXT_PVSERVER" ), aParaVisSettingsTab, LightApp_Preferences::Bool, "PARAVIS", "no_ext_pv_server");
+
int aSaveType = addPreference(tr( "PREF_SAVE_TYPE_LBL" ), aParaVisSettingsTab,
LightApp_Preferences::Selector,
"PARAVIS", "savestate_type");
PyConsole_Interp* pyInterp = app->pythonConsole()->getInterp();
{
PyLockWrapper aGil;
- std::string cmd = "import paraview; paraview.fromGUI = True;";
+ std::string cmd = "import paraview;paraview.fromGUI = True";
pyInterp->run(cmd.c_str());
}
pqApplicationCore::instance()->settings()->sync();
pqPVApplicationCore * app = GetPVApplication();
- // [ABN] : TODO review this, this triggers an ugly crash (Python thread state mix-up)
- // at SALOME's exit.
// Schedule destruction of PVApplication singleton:
-// if (app)
-// app->deleteLater();
+ if (app)
+ app->deleteLater();
}
PARAVIS_ORB::PARAVIS_Gen_var PVViewer_ViewManager::GetEngine()
bool PVViewer_ViewManager::ConnectToExternalPVServer(SUIT_Desktop* aDesktop)
{
+ SUIT_ResourceMgr* aResourceMgr = SUIT_Session::session()->resourceMgr();
+ bool noConnect = aResourceMgr->booleanValue( "PARAVIS", "no_ext_pv_server", false );
+ if (noConnect)
+ return true;
+
pqServer* server = pqActiveObjects::instance().activeServer();
if (server && server->isRemote())
{