From: rnv Date: Fri, 5 Jun 2020 13:18:34 +0000 (+0300) Subject: Load module (GUI libraries) from the python script. X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b088e4ed9b075662c1787f8b8e6607ad1590bc3e;p=modules%2Fgui.git Load module (GUI libraries) from the python script. --- diff --git a/src/LightApp/LightApp_Application.cxx b/src/LightApp/LightApp_Application.cxx index 8dfa333b0..5bcbd1598 100644 --- a/src/LightApp/LightApp_Application.cxx +++ b/src/LightApp/LightApp_Application.cxx @@ -4956,6 +4956,18 @@ void LightApp_Application::onDesktopMessage( const QString& message ) if ( !vtype.isEmpty() ) getViewManager( vtype, true ); } + else if ( message.toLower().startsWith("load_module" ) ) { + QString moduleName = message.split( sectionSeparator ).last(); + CAM_Module* mod = module( moduleName ); + if ( !mod ) + mod = module( moduleTitle( moduleName ) ); + if ( !mod ) { + mod = loadModule( moduleName ); + if ( !mod ) + mod = loadModule( moduleTitle( moduleName) ); + addModule(mod); + } + } else { QStringList data = message.split( sectionSeparator ); if ( data.count() > 1 ) {