sfx2/source/dialog/templdlg.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 038dcdd6d54c0c0866ddcaeffb19846095f4c554
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Thu Nov 25 20:16:14 2021 +0000
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Mon Nov 29 09:40:38 2021 +0100

    mxTreeBox is always true
    
    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/+/125835
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125910
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index 5a7041f22cbf..8f9f213f40ee 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -1963,7 +1963,7 @@ void SfxCommonTemplateDialog_Impl::UpdateStyleDependents()
     if ( IsInitialized() &&
          IsCheckedItem("watercan") &&
          // only if that region is allowed
-         nullptr != pFamilyState[nActFamily-1] && (mxTreeBox || 
mxFmtLb->count_selected_rows() <= 1) )
+         nullptr != pFamilyState[nActFamily-1] && IsSafeForWaterCan() )
     {
         Execute_Impl(SID_STYLE_WATERCAN,
                      "", "", 0);

Reply via email to