From b57cc215845c2b391bd5c36196f68e39623874d8 Mon Sep 17 00:00:00 2001 From: kosta Date: Tue, 14 Feb 2023 19:11:55 +0100 Subject: [PATCH] [bos #32523][EDF] SALOME on Demand GUI. Removed forgotten updateExtActions() call in modules loop. Commented redundant setting isCustom to module action data. --- src/LightApp/LightApp_Application.cxx | 1 - src/LightApp/LightApp_ModuleAction.cxx | 6 +++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/LightApp/LightApp_Application.cxx b/src/LightApp/LightApp_Application.cxx index d0754d3d3..8702a1f97 100644 --- a/src/LightApp/LightApp_Application.cxx +++ b/src/LightApp/LightApp_Application.cxx @@ -995,7 +995,6 @@ void LightApp_Application::onExtAdding() QFileInfo extFileInfo(path); QString extName = extFileInfo.baseName(); moduleAction->insertExtension(extName); - moduleAction->updateExtActions(); } } diff --git a/src/LightApp/LightApp_ModuleAction.cxx b/src/LightApp/LightApp_ModuleAction.cxx index f5f1518c1..f42bcf1cd 100644 --- a/src/LightApp/LightApp_ModuleAction.cxx +++ b/src/LightApp/LightApp_ModuleAction.cxx @@ -376,7 +376,11 @@ void LightApp_ModuleAction::insertModule( const QString& name, const QIcon& ico, { QtxAction* a = new QtxAction( name, ico, name, 0, this, true ); a->setStatusTip( tr( "ACTIVATE_MODULE_TOP" ).arg( name ) ); - a->setData( isCustom ); + + // Commented because the next call mySet->insertAction() overrides it with + // action id int != 0 value, so test a->data().toBool() is always true after that. + // Leave it here to mention that we need other approach to mark module as custom. + // a->setData( isCustom ); mySet->insertAction( a, -1, idx ); update(); -- 2.39.2