Resolves: tdf#101972 skip invalidating labels on alt if autoaccel is disabled

so no Invalidate will be called if auto accelerators are not enabled
so there should be no blinking under windows

Change-Id: Iccc5dad7af41f39ac02d3be93e935f2d926a82a6
This commit is contained in:
Caolán McNamara 2017-02-09 10:26:05 +00:00
parent b52948a77d
commit f67dc04cfd
2 changed files with 2 additions and 2 deletions

View File

@ -2554,7 +2554,7 @@ bool MenuBar::ImplHandleCmdEvent( const CommandEvent& rCEvent )
MenuBarWindow* pWin = static_cast<MenuBarWindow*>(ImplGetWindow());
if ( pWin && pWin->IsEnabled() && pWin->IsInputEnabled() && ! pWin->IsInModalMode() )
{
if (rCEvent.GetCommand() == CommandEventId::ModKeyChange)
if (rCEvent.GetCommand() == CommandEventId::ModKeyChange && ImplGetSVData()->maNWFData.mbAutoAccel)
{
const CommandModKeyData* pCData = rCEvent.GetModKeyData ();
if (pWin->nHighlightedItem == ITEMPOS_INVALID)

View File

@ -159,7 +159,7 @@ namespace
bool Accelerator::ToggleMnemonicsOnHierarchy(const CommandEvent& rCEvent, vcl::Window *pWindow)
{
if (rCEvent.GetCommand() == CommandEventId::ModKeyChange)
if (rCEvent.GetCommand() == CommandEventId::ModKeyChange && ImplGetSVData()->maNWFData.mbAutoAccel)
{
const CommandModKeyData *pCData = rCEvent.GetModKeyData();
const bool bShowAccel = pCData && pCData->IsMod2();