From b088e4ed9b075662c1787f8b8e6607ad1590bc3e Mon Sep 17 00:00:00 2001 From: rnv Date: Fri, 5 Jun 2020 16:18:34 +0300 Subject: [PATCH] Load module (GUI libraries) from the python script. --- src/LightApp/LightApp_Application.cxx | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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 ) { -- 2.39.2