From 01ed0842ff0d57c2aed6f0712c0688a4f8d0a31a Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 27 Mar 2019 15:39:39 +0100 Subject: [PATCH] Set mnemonics for the closest preceding label Due to a wrong "else" in RealizeTabOrder() implementation, we could set the mnemonic widget for a previous widget using mnemonics (i.e. wxStaticText or wxStaticBox) rather than the one closest to the actual control activated by the mnemonic. --- src/gtk/window.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index 375912170f..5010c5994a 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -4786,7 +4786,8 @@ void wxWindowGTK::RealizeTabOrder() } } } - else if ( win->GTKWidgetNeedsMnemonic() ) + + if ( win->GTKWidgetNeedsMnemonic() ) { mnemonicWindow = win; }