From: vsr Date: Fri, 18 Dec 2009 11:16:45 +0000 (+0000) Subject: Merge from BR_PARAVIS_DEV 17/12/2009 X-Git-Tag: WSDL_Dev_V1~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0f0367ace60fc51f35abd044a562be026bf75f29;p=modules%2Fgui.git Merge from BR_PARAVIS_DEV 17/12/2009 --- diff --git a/src/CAM/CAM_Application.cxx b/src/CAM/CAM_Application.cxx index fadf36800..22a406965 100755 --- a/src/CAM/CAM_Application.cxx +++ b/src/CAM/CAM_Application.cxx @@ -523,13 +523,15 @@ QString CAM_Application::moduleIcon( const QString& name ) const */ bool CAM_Application::isModuleAccessible( const QString& name ) const { + bool found = false; + bool blocked = false; int aAppsNb = SUIT_Session::session()->applications().count(); - for ( ModuleInfoList::const_iterator it = myInfoList.begin(); it != myInfoList.end(); ++it ) + for ( ModuleInfoList::const_iterator it = myInfoList.begin(); it != myInfoList.end() && !found; ++it ) { - if ( (*it).name == name ) - return (*it).isSingleton && (aAppsNb > 1); + found = (*it).name == name; + if ( found ) blocked = (*it).isSingleton && (aAppsNb > 1); } - return false; + return found && !blocked; } /*!