From 1e0f52a50becc35eba00ba1a6b24a11c8fe97a48 Mon Sep 17 00:00:00 2001 From: san Date: Thu, 22 Dec 2011 10:30:17 +0000 Subject: [PATCH] Fix: Different action id context prefixes used (prevent using the same string as module and application name). --- src/CAM/CAM_Module.cxx | 6 ++++-- src/SUIT/SUIT_Application.cxx | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/CAM/CAM_Module.cxx b/src/CAM/CAM_Module.cxx index 1900106d2..8dff58b22 100755 --- a/src/CAM/CAM_Module.cxx +++ b/src/CAM/CAM_Module.cxx @@ -886,11 +886,13 @@ int CAM_Module::registerAction( const int id, QAction* a ) myActionMap.insert( ident, a ); + QString ctx = QString( "MOD_%1" ).arg( moduleName() ); + if ( menuMgr() ) - menuMgr()->registerAction( a, QtxActionMgrId( ident, moduleName() ) ); + menuMgr()->registerAction( a, QtxActionMgrId( ident, ctx ) ); if ( toolMgr() ) - toolMgr()->registerAction( a, QtxActionMgrId( ident, moduleName() ) ); + toolMgr()->registerAction( a, QtxActionMgrId( ident, ctx ) ); if ( application() && application()->desktop() ) application()->desktop()->addAction( a ); diff --git a/src/SUIT/SUIT_Application.cxx b/src/SUIT/SUIT_Application.cxx index 5fc78bc75..b62dfedb7 100755 --- a/src/SUIT/SUIT_Application.cxx +++ b/src/SUIT/SUIT_Application.cxx @@ -639,11 +639,13 @@ int SUIT_Application::registerAction( const int id, QAction* a ) myActionMap.insert( ident, a ); + QString ctx = QString( "APP_%1" ).arg( applicationName() ); + if ( desktop() && desktop()->menuMgr() ) - desktop()->menuMgr()->registerAction( a, QtxActionMgrId( ident, applicationName() ) ); + desktop()->menuMgr()->registerAction( a, QtxActionMgrId( ident, ctx ) ); if ( desktop() && desktop()->toolMgr() ) - desktop()->toolMgr()->registerAction( a, QtxActionMgrId( ident, applicationName() ) ); + desktop()->toolMgr()->registerAction( a, QtxActionMgrId( ident, ctx ) ); return ident; } -- 2.39.2