diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2014-05-18 14:28:39 +0200 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2014-06-05 11:10:57 +0200 |
commit | eda624641b34a7d4315388c8ec1aebe44f63982e (patch) | |
tree | e5392764efad425741cba297c367fd2bb5eec4e8 /framework | |
parent | b24739c98f3b5025e3dd5d86fadeae9983ccd5bc (diff) |
lp#1296715: refresh invalidated menus
- so we need to be a StatusListener in framework after all
- we ware updating all menus for now, instead of just one
- this would have a hugh performance hit when there is much change to the menu
- thus we just invalidate the menu and update with all changes after 100ms once
Change-Id: I48cda968cf0ae1eae0421b3424bb3e5830817e84
Diffstat (limited to 'framework')
-rw-r--r-- | framework/source/uielement/menubarmanager.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx index de31c3c005ea..341225135ee2 100644 --- a/framework/source/uielement/menubarmanager.cxx +++ b/framework/source/uielement/menubarmanager.cxx @@ -67,6 +67,7 @@ #include <toolkit/helper/vclunohelper.hxx> #include <vcl/svapp.hxx> #include <vcl/window.hxx> +#include <vcl/menu.hxx> #include <vcl/settings.hxx> #include <osl/mutex.hxx> #include <osl/file.hxx> @@ -430,6 +431,10 @@ throw ( RuntimeException, std::exception ) SolarMutexGuard aSolarGuard; { + vcl::MenuInvalidator aInvalidator; + aInvalidator.Invalidated(); + } + { if ( m_bDisposed ) return; @@ -914,9 +919,9 @@ IMPL_LINK( MenuBarManager, Activate, Menu *, pMenu ) if ( !bPopupMenu ) { - // We need only an update to reflect the current state xMenuItemDispatch->addStatusListener( static_cast< XStatusListener* >( this ), aTargetURL ); xMenuItemDispatch->removeStatusListener( static_cast< XStatusListener* >( this ), aTargetURL ); + xMenuItemDispatch->addStatusListener( static_cast< XStatusListener* >( this ), aTargetURL ); } } else if ( !bPopupMenu ) |