summaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-11-11 20:58:25 +0000
committerCaolán McNamara <caolanm@redhat.com>2020-11-12 09:48:37 +0100
commit590b4e75e3a3d4d415f71c17f2aa2aea2326daf9 (patch)
tree10bc18ee70605b87e744b4e61cb3450628d0111d /extensions
parent08f42a24a60c16a26d34e71d8e0d54c851e6711b (diff)
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@redhat.com>
Diffstat (limited to 'extensions')
-rw-r--r--extensions/source/propctrlr/browserline.cxx14
1 files changed, 8 insertions, 6 deletions
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);
}
}