sw/source/ui/index/cnttab.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit fe871fa933c1da3f6bcdb9039dd8cf7b570ad94f
Author:     Caolán McNamara <[email protected]>
AuthorDate: Wed Sep 13 14:18:23 2023 +0100
Commit:     Caolán McNamara <[email protected]>
CommitDate: Thu Sep 14 18:43:58 2023 +0200

    tdf#157223 get sequence name before toggling checkboxes
    
    The expectation is that setting state/values on widgets from code
    doesn't trigger any callbacks, which are assumed to be from user
    interaction only.
    
    But explictly toggling on a radio implicitly toggles off the other
    radio, and while there is no callback from the explicit toggle on,
    there is from the implicit toggle off.
    
    Just move the explicit toggles to the end, after where the
    values are read which the callback affects.
    
    Change-Id: Icfc2c94950be671d6fc23789584b4d3c6e5395d8
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156879
    Reviewed-by: Michael Stahl <[email protected]>
    Tested-by: Jenkins

diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index fc6f096372f2..f68aa514d272 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -1057,8 +1057,6 @@ void SwTOXSelectTabPage::ApplyTOXDescription()
     }
     else if (TOX_ILLUSTRATIONS == aCurType.eType || TOX_TABLES == 
aCurType.eType)
     {
-        m_xFromObjectNamesRB->set_active(rDesc.IsCreateFromObjectNames());
-        m_xFromCaptionsRB->set_active(!rDesc.IsCreateFromObjectNames());
         OUString sName(rDesc.GetSequenceName());
         int nIndex = m_xCaptionSequenceLB->find_text(sName);
         if (nIndex != -1)
@@ -1066,6 +1064,8 @@ void SwTOXSelectTabPage::ApplyTOXDescription()
         
m_xDisplayTypeLB->set_active(static_cast<sal_Int32>(rDesc.GetCaptionDisplay()));
         if (m_xDisplayTypeLB->get_active() == -1)
             m_xDisplayTypeLB->set_active(0);
+        m_xFromObjectNamesRB->set_active(rDesc.IsCreateFromObjectNames());
+        m_xFromCaptionsRB->set_active(!rDesc.IsCreateFromObjectNames());
         RadioButtonHdl(*m_xFromCaptionsRB);
     }
     else if(TOX_OBJECTS == aCurType.eType)

Reply via email to