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

New commits:
commit bcb3e9c54441fd47d673774583f573d391556866
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Wed Sep 13 14:18:23 2023 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Wed Sep 13 16:17:08 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/+/156898
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index a44f2f7e2263..829beb6e9499 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