sfx2/source/dialog/dinfdlg.cxx |   15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

New commits:
commit 346cda683763aa352cf67a035340e48133790f7f
Author:     NickWingate <[email protected]>
AuthorDate: Fri Aug 12 09:48:18 2022 +0100
Commit:     Szymon Kłos <[email protected]>
CommitDate: Sun Nov 20 11:25:50 2022 +0100

    Fix opening duration custom property shows text
    
    Before saving a duration custom property and
    then closing and opening file props wouldn't
    show the duration type and value and instead
    blank text
    
    Signed-off-by: NickWingate <[email protected]>
    Change-Id: Ie6536dd75151db40f335985c1ce92236ce77ddc2
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138180
    Reviewed-by: Szymon Kłos <[email protected]>
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142986
    Tested-by: Jenkins

diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 9cb911c469e0..eec2e4ca980d 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -1796,17 +1796,14 @@ void CustomPropertiesWindow::ReloadLinesContent()
             pLine->m_xDurationField->SetDuration(aTmpDuration);
         }
 
-        if (nType != Custom_Type_Duration)
+        if (Custom_Type_Boolean == nType)
         {
-            if (Custom_Type_Boolean == nType)
-            {
-                if (bTmpValue)
-                    pLine->m_xYesNoButton->CheckYes();
-                else
-                    pLine->m_xYesNoButton->CheckNo();
-            }
-            pLine->m_xTypeBox->set_active_id(OUString::number(nType));
+            if (bTmpValue)
+                pLine->m_xYesNoButton->CheckYes();
+            else
+                pLine->m_xYesNoButton->CheckNo();
         }
+        pLine->m_xTypeBox->set_active_id(OUString::number(nType));
 
         pLine->DoTypeHdl(*pLine->m_xTypeBox);
     }

Reply via email to