From: DUC ANH HOANG Date: Tue, 25 Jul 2023 13:51:46 +0000 (+0200) Subject: always updating module_root_dir X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=aa5f47bc6b49ed41a2d0fee86e0eb9ed1bd2712a;p=modules%2Fgui.git always updating module_root_dir --- diff --git a/src/LightApp/LightApp_Application.cxx b/src/LightApp/LightApp_Application.cxx index 44b057ce6..ae7bca15f 100644 --- a/src/LightApp/LightApp_Application.cxx +++ b/src/LightApp/LightApp_Application.cxx @@ -884,8 +884,9 @@ void LightApp_Application::customize() // b. here we add custom modules (manually added by the user) if ( HAS_SALOME_ON_DEMAND ) { - // Update SalomeApprc.X.X.X with SALOME_APPLICATION_DIR + // Update rc file updateSalomeApprc(); + QStringList modList = resourceMgr()->stringValue( "launch", "user_modules" ).split( ";", QString::SkipEmptyParts ); foreach ( QString aModule, modList ) addUserModule( aModule, resourceMgr()->stringValue( "user_modules", aModule ) ); @@ -896,6 +897,9 @@ void LightApp_Application::customize() } } +/*! + Update rc file with SALOME_APPLICATION_DIR or with SALOME_MODULES. +*/ void LightApp_Application::updateSalomeApprc() { SUIT_ResourceMgr* resMgr = resourceMgr(); diff --git a/src/SalomeApprc_utils/SalomeApprc_utils.cxx b/src/SalomeApprc_utils/SalomeApprc_utils.cxx index 0b153aa24..460058801 100644 --- a/src/SalomeApprc_utils/SalomeApprc_utils.cxx +++ b/src/SalomeApprc_utils/SalomeApprc_utils.cxx @@ -66,10 +66,7 @@ void AddComponents_from_salomemodules(const QString& salomemodules, const QDir& void AddGuiComponent(const QString& comp, const QString& CompRoot, SUIT_ResourceMgr* ResMgr) { QStringList CompsResMgr = ResMgr->stringValue("launch", "user_modules").split(";", QString::SkipEmptyParts); - if (!CompsResMgr.contains(comp)) - { - ResMgr->setValue( "user_modules", comp, CompRoot ); - } + ResMgr->setValue( "user_modules", comp, CompRoot ); CompsResMgr << comp; CompsResMgr.removeDuplicates();