svx/source/sidebar/area/AreaPropertyPanelBase.cxx |   10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

New commits:
commit def6d74f37b2fce8e0f29fb967108dacefd78896
Author:     Samuel Mehrbrodt <samuel.mehrbr...@allotropia.de>
AuthorDate: Mon Sep 4 11:52:08 2023 +0200
Commit:     Adolfo Jayme Barrientos <fit...@ubuntu.com>
CommitDate: Mon Oct 9 17:20:50 2023 +0200

    tdf#151188 Select correct fill type in sidebar
    
    Change-Id: Ic123e6b21009cc57bf1c4b5f4edc6dcd277bae0a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156510
    Tested-by: Jenkins
    Reviewed-by: Samuel Mehrbrodt <samuel.mehrbr...@allotropia.de>
    (cherry picked from commit b5effb66ee1563689c27ff10b682357120ab7786)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156534
    Reviewed-by: Patrick Luby <plub...@neooffice.org>
    Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com>

diff --git a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx 
b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
index 128709704d3c..fdb5ca82a899 100644
--- a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
+++ b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
@@ -1067,10 +1067,14 @@ void 
AreaPropertyPanelBase::updateFillUseBackground(bool bDisabled, bool bDefaul
         if (pState)
         {
             const XFillUseSlideBackgroundItem* pItem = static_cast<const 
XFillUseSlideBackgroundItem*>(pState);
-            // When XFillUseSlideBackgroundItem is true, select "Use 
Background Fill". When false, select "None"
+            // When XFillUseSlideBackgroundItem is set, select "Use Background 
Fill".
+            // When false, select "None" (only if "Use background fill" was 
selected beforehand)
             int nPos = pItem->GetValue() ? USE_BACKGROUND : NONE;
-            mxLbFillType->set_active(nPos);
-            FillStyleChanged(false);
+            if ((nPos == NONE && mxLbFillType->get_active() == USE_BACKGROUND) 
|| nPos == USE_BACKGROUND)
+            {
+                mxLbFillType->set_active(nPos);
+                FillStyleChanged(false);
+            }
         }
     }
 }

Reply via email to