[Libreoffice-commits] core.git: vcl/source

Caolán McNamara caolanm at redhat.com
Tue Sep 27 14:22:23 UTC 2016


 vcl/source/window/menufloatingwindow.cxx |   18 ++++++------------
 1 file changed, 6 insertions(+), 12 deletions(-)

New commits:
commit 0d56cc15803965a1be6991a3630076f7ccf67817
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Sep 27 15:18:28 2016 +0100

    detangle code that now looks silly since...
    
    commit 9b7dfb10641ba7978ffcbd1db0507163411ae027
    Author: Caolán McNamara <caolanm at redhat.com>
    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

diff --git a/vcl/source/window/menufloatingwindow.cxx b/vcl/source/window/menufloatingwindow.cxx
index 715398d..f4adcf0 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<PopupMenu*>(pMenu.get());
 
     bInExecute = true;
-//  bCallingSelect = false;
 
     while ( bInExecute )
         Application::Yield();
@@ -405,19 +404,14 @@ void MenuFloatingWindow::Execute()
 
 void MenuFloatingWindow::StopExecute()
 {
-    VclPtr<vcl::Window> xFocusId;
-    // restore focus
-    // (could have been restored in Select)
-    if ( xSaveFocusId != nullptr )
+    VclPtr<vcl::Window> 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;


More information about the Libreoffice-commits mailing list