From 590b4e75e3a3d4d415f71c17f2aa2aea2326daf9 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 11 Nov 2020 20:58:25 +0000 Subject: tdf#138131 don't set enabled if container is already enabled MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I46556c7242ad9b5c4c7a8fb923dc87458e56494e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105613 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- extensions/source/propctrlr/browserline.cxx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'extensions/source') 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); } } -- cgit