X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSUIT%2FSUIT_Application.cxx;h=06d9180ed8138cd4a388437a8f8014578d1d4de2;hb=efe3cdefadc31ad9cdaa9fd7fc368e2931cebdf1;hp=95a42da89a584a20d00b7e136ecee0569e194cf0;hpb=45ee4bcf1d6a7d12b9525e4cefe42ef91b0dbe64;p=modules%2Fgui.git diff --git a/src/SUIT/SUIT_Application.cxx b/src/SUIT/SUIT_Application.cxx old mode 100755 new mode 100644 index 95a42da89..06d9180ed --- a/src/SUIT/SUIT_Application.cxx +++ b/src/SUIT/SUIT_Application.cxx @@ -58,7 +58,8 @@ SUIT_Application::SUIT_Application() : QObject( 0 ), myStudy( 0 ), myDesktop( 0 ), - myStatusLabel( 0 ) + myStatusLabel( 0 ), + myPostRoutines( QList() ) { if ( SUIT_Session::session() ) SUIT_Session::session()->insertApplication( this ); @@ -74,6 +75,9 @@ SUIT_Application::~SUIT_Application() delete s; setDesktop( 0 ); + + foreach ( PostRoutine routine, myPostRoutines ) + routine(); } /*! @@ -689,7 +693,8 @@ int SUIT_Application::registerAction( const int id, QAction* a ) if ( desktop() && desktop()->toolMgr() ) desktop()->toolMgr()->registerAction( a ); - if ( desktop() ) + if ( desktop() && a->shortcutContext() != Qt::WidgetShortcut && + a->shortcutContext() != Qt::WidgetWithChildrenShortcut ) desktop()->addAction( a ); return ident; @@ -727,3 +732,9 @@ void SUIT_Application::onHelpContextModule( const QString& /*theComponentName*/, const QString& /*theContext*/ ) { } + +void SUIT_Application::addPostRoutine( PostRoutine theRoutine ) +{ + if ( !myPostRoutines.contains( theRoutine ) ) + myPostRoutines << theRoutine; +}