From: mpv Date: Mon, 8 Jun 2020 10:37:57 +0000 (+0300) Subject: connectToStudy added to connect the data model of a light module to support dumps... X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ae629fcd7e21122781792214f9440f69aecb1517;p=modules%2Fgui.git connectToStudy added to connect the data model of a light module to support dumps and save without activation of the module --- diff --git a/src/LightApp/LightApp_Application.cxx b/src/LightApp/LightApp_Application.cxx index 5bcbd1598..baf53032e 100644 --- a/src/LightApp/LightApp_Application.cxx +++ b/src/LightApp/LightApp_Application.cxx @@ -4956,7 +4956,7 @@ void LightApp_Application::onDesktopMessage( const QString& message ) if ( !vtype.isEmpty() ) getViewManager( vtype, true ); } - else if ( message.toLower().startsWith("load_module" ) ) { + else if ( message.toLower().startsWith("register_module_in_study" ) ) { QString moduleName = message.split( sectionSeparator ).last(); CAM_Module* mod = module( moduleName ); if ( !mod ) @@ -4965,7 +4965,12 @@ void LightApp_Application::onDesktopMessage( const QString& message ) mod = loadModule( moduleName ); if ( !mod ) mod = loadModule( moduleTitle( moduleName) ); - addModule(mod); + if ( mod ) { + addModule(mod); + CAM_Study* anActiveStudy = dynamic_cast(activeStudy()); + if (anActiveStudy) + mod->connectToStudy(anActiveStudy); + } } } else {