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

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Thu Nov 12 08:49:25 UTC 2020


 extensions/source/propctrlr/browserline.cxx |   14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

New commits:
commit 590b4e75e3a3d4d415f71c17f2aa2aea2326daf9
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Nov 11 20:58:25 2020 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Nov 12 09:48:37 2020 +0100

    tdf#138131 don't set enabled if container is already enabled
    
    Change-Id: I46556c7242ad9b5c4c7a8fb923dc87458e56494e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105613
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/extensions/source/propctrlr/browserline.cxx b/extensions/source/propctrlr/browserline.cxx
index 9b45c0c9e3f5..5f185c594243 100644
--- a/extensions/source/propctrlr/browserline.cxx
+++ b/extensions/source/propctrlr/browserline.cxx
@@ -232,16 +232,18 @@ namespace pcr
             }
         }
 
-        void implEnable(weld::Widget* pWindow, sal_uInt16 nEnabledBits, sal_uInt16 nMatchBits)
+        void implEnable(weld::Widget* pWindow, bool bEnable)
         {
-            if (pWindow)
-                pWindow->set_sensitive((nEnabledBits & nMatchBits) == nMatchBits);
+            // tdf#138131 get_sensitive comparison as bodge for
+            // vcl's recursive Enable behavior
+            if (pWindow && pWindow->get_sensitive() != bEnable)
+                pWindow->set_sensitive(bEnable);
         }
 
-        void implEnable(weld::Widget* pWindow, bool bEnable)
+        void implEnable(weld::Widget* pWindow, sal_uInt16 nEnabledBits, sal_uInt16 nMatchBits)
         {
-            if (pWindow)
-                pWindow->set_sensitive(bEnable);
+            bool bEnable = ((nEnabledBits & nMatchBits) == nMatchBits);
+            implEnable(pWindow, bEnable);
         }
     }
 


More information about the Libreoffice-commits mailing list