From 65eba5227b70fdc5c69a9199332ab8a3fdf6c1b1 Mon Sep 17 00:00:00 2001 From: vsr Date: Thu, 30 Oct 2014 09:22:58 +0300 Subject: [PATCH] Two new types of messages are added to the GUI CORGBA interface - connect_to_study: to connect to the study opened at a data server - activate viewer: to activate viewer if given type --- src/LightApp/LightApp_Application.cxx | 5 +++++ src/SalomeApp/SalomeApp_Application.cxx | 3 +++ 2 files changed, 8 insertions(+) diff --git a/src/LightApp/LightApp_Application.cxx b/src/LightApp/LightApp_Application.cxx index ef2f6c55d..2229aa3ea 100644 --- a/src/LightApp/LightApp_Application.cxx +++ b/src/LightApp/LightApp_Application.cxx @@ -4154,6 +4154,11 @@ void LightApp_Application::onDesktopMessage( const QString& message ) // update object browser updateObjectBrowser(); } + else if ( message.toLower().startsWith( "activate_viewer" ) ) { + QString vtype = message.split( sectionSeparator ).last(); + if ( !vtype.isEmpty() ) + getViewManager( vtype, true ); + } else { QStringList data = message.split( sectionSeparator ); if ( data.count() > 1 ) { diff --git a/src/SalomeApp/SalomeApp_Application.cxx b/src/SalomeApp/SalomeApp_Application.cxx index 12ff6b9a3..c9e8d72e1 100644 --- a/src/SalomeApp/SalomeApp_Application.cxx +++ b/src/SalomeApp/SalomeApp_Application.cxx @@ -588,6 +588,9 @@ void SalomeApp_Application::onDesktopMessage( const QString& message ) if ( a ) a->setEnabled( false ); } + else if ( message.toLower() == "connect_to_study" ) { + onLoadDoc(); + } LightApp_Application::onDesktopMessage( message ); } -- 2.39.2