[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - vcl/source

Caolán McNamara caolanm at redhat.com
Tue Jul 7 07:57:35 PDT 2015


 vcl/source/window/menu.cxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 9f7970dfc403b3d90c19a6226e1853d5d3fca4a6
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Jul 7 15:08:05 2015 +0100

    Resolves: tdf#92539 reversed logic on enable/disable
    
    Change-Id: I26ef918c0a68a84c22da3979c1180a2aee7a8109
    (cherry picked from commit 13d08f07b4d67afe211997ca37934c45208d50a6)
    Reviewed-on: https://gerrit.libreoffice.org/16823
    Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
    Tested-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>

diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 8f2a93f..4e2345a 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -1892,7 +1892,7 @@ void Menu::ImplPaint(vcl::RenderContext& rRenderContext,
                     if (rRenderContext.IsNativeControlSupported(CTRL_MENU_POPUP, PART_MENU_SEPARATOR))
                     {
                         ControlState nState = ControlState::NONE;
-                        if (pData->bEnabled && !pWindow->IsEnabled())
+                        if (pData->bEnabled && pWindow->IsEnabled())
                             nState |= ControlState::ENABLED;
                         if (bHighlighted)
                             nState |= ControlState::SELECTED;
@@ -1948,7 +1948,7 @@ void Menu::ImplPaint(vcl::RenderContext& rRenderContext,
                             if (pData->bChecked)
                                 nState |= ControlState::PRESSED;
 
-                            if (pData->bEnabled && !pWindow->IsEnabled())
+                            if (pData->bEnabled && pWindow->IsEnabled())
                                 nState |= ControlState::ENABLED;
 
                             if (bHighlighted)
@@ -2089,7 +2089,7 @@ void Menu::ImplPaint(vcl::RenderContext& rRenderContext,
                             aSpacing = nOuterSpaceX;
                         }
 
-                        if (pData->bEnabled && !pWindow->IsEnabled())
+                        if (pData->bEnabled && pWindow->IsEnabled())
                             nState |= ControlState::ENABLED;
                         if (bHighlighted)
                             nState |= ControlState::SELECTED;


More information about the Libreoffice-commits mailing list