From 0d56cc15803965a1be6991a3630076f7ccf67817 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 27 Sep 2016 15:18:28 +0100 Subject: detangle code that now looks silly since... MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit commit 9b7dfb10641ba7978ffcbd1db0507163411ae027 Author: Caolán McNamara Date: Thu Jun 9 16:52:21 2016 +0100 EndSaveFocus does nothing on the !bRestore case removed the code that made it look like it made sense Change-Id: I2e7280fd6643e86d65cba04c8302be099d6f3d0e --- vcl/source/window/menufloatingwindow.cxx | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'vcl/source/window') diff --git a/vcl/source/window/menufloatingwindow.cxx b/vcl/source/window/menufloatingwindow.cxx index 715398d01a41..f4adcf0aada5 100644 --- a/vcl/source/window/menufloatingwindow.cxx +++ b/vcl/source/window/menufloatingwindow.cxx @@ -395,7 +395,6 @@ void MenuFloatingWindow::Execute() pSVData->maAppData.mpActivePopupMenu = static_cast(pMenu.get()); bInExecute = true; -// bCallingSelect = false; while ( bInExecute ) Application::Yield(); @@ -405,19 +404,14 @@ void MenuFloatingWindow::Execute() void MenuFloatingWindow::StopExecute() { - VclPtr xFocusId; - // restore focus - // (could have been restored in Select) - if ( xSaveFocusId != nullptr ) + VclPtr xFocusId(xSaveFocusId); + // restore focus (could have been restored in Select) + if (xFocusId != nullptr) { - xFocusId = xSaveFocusId; - if ( xFocusId != nullptr ) - { - xSaveFocusId = nullptr; - ImplGetSVData()->maWinData.mbNoDeactivate = false; - } + xSaveFocusId = nullptr; + ImplGetSVData()->maWinData.mbNoDeactivate = false; } - ImplEndPopupMode( FloatWinPopupEndFlags::NONE, xFocusId ); + ImplEndPopupMode(FloatWinPopupEndFlags::NONE, xFocusId); aHighlightChangedTimer.Stop(); bInExecute = false; -- cgit