From f67dc04cfdd9e63a45ec6c8bc00829bce8f17d4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Thu, 9 Feb 2017 10:26:05 +0000 Subject: [PATCH] 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 --- vcl/source/window/menu.cxx | 2 +- vcl/source/window/syswin.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index 00b931e32ba9..5a1a2f74efa3 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -2554,7 +2554,7 @@ bool MenuBar::ImplHandleCmdEvent( const CommandEvent& rCEvent ) MenuBarWindow* pWin = static_cast(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) diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx index 4932deee1a4f..a8ed067a5b4e 100644 --- a/vcl/source/window/syswin.cxx +++ b/vcl/source/window/syswin.cxx @@ -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();