From 18a66c788983115a37bb02112d3dba8935a4ce97 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 25 Nov 2021 20:16:14 +0000 Subject: m_xTreeBox is always true MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit this has evolved from an optional m_pTreeBox widget to an always present widget that's optionally visible and this case wasn't updated somewhere along the line. Use "IsSafeForWaterCan" which the other cases of this pattern were merged to Change-Id: Ia20327ade5378bbdfa9fbfecbfa9705a33555f17 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125850 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- sfx2/source/dialog/StyleList.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'sfx2') diff --git a/sfx2/source/dialog/StyleList.cxx b/sfx2/source/dialog/StyleList.cxx index a76a0dd094fb..776d355b217e 100644 --- a/sfx2/source/dialog/StyleList.cxx +++ b/sfx2/source/dialog/StyleList.cxx @@ -1051,8 +1051,7 @@ IMPL_LINK_NOARG(StyleList, UpdateStyleDependents, void*, void) // Trigger Help PI. Only when the watercan is on if (m_nActFamily != 0xffff && m_pParentDialog->IsCheckedItem("watercan") && // only if that region is allowed - nullptr != m_pFamilyState[m_nActFamily - 1] - && (m_xTreeBox || m_xFmtLb->count_selected_rows() <= 1)) + nullptr != m_pFamilyState[m_nActFamily - 1] && IsSafeForWaterCan(nullptr)) { m_pParentDialog->Execute_Impl(SID_STYLE_WATERCAN, "", "", 0, *this); m_pParentDialog->Execute_Impl(SID_STYLE_WATERCAN, GetSelectedEntry(), "", -- cgit v1.2.3