svx/source/dialog/srchdlg.cxx |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 3c10bb151e5864c0ff532910b9f81185aa49c21f
Author:     Justin Luth <justin_l...@sil.org>
AuthorDate: Thu Dec 2 14:38:53 2021 +0200
Commit:     Justin Luth <jl...@mail.com>
CommitDate: Fri Dec 3 16:29:40 2021 +0100

    tdf#129629 sw UI: Find/replace - stop popping open MORE section
    
    This was a regression from LO 6.1, where it would always
    show the "more" options if one of them was enabled.
    
    That might be fine for the dialog initialization
    (and that is how I implemented it)
    but even that is a bit much. Perhaps it should be a
    search option that is remembered while the application
    is running. Is that what pSearchOptions holds?
    
    Anyway, this much I can easily figure out.
    Someone who knows more about these things
    can enhance it further if they want.
    
    Change-Id: I8288bea514840f4ea06deb00a3603aa9568a75b7
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126226
    Tested-by: Jenkins
    Reviewed-by: Justin Luth <jl...@mail.com>

diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx
index ba5def14777e..f2c506c62ba3 100644
--- a/svx/source/dialog/srchdlg.cxx
+++ b/svx/source/dialog/srchdlg.cxx
@@ -800,8 +800,6 @@ void SvxSearchDialog::Init_Impl( bool bSearchPattern )
     m_xIncludeDiacritics->set_active( !aOpt.IsIgnoreDiacritics_CTL() );
     if ( m_xIncludeKashida->get_visible() )
         m_xIncludeKashida->set_active( !aOpt.IsIgnoreKashida_CTL() );
-    if ( SvxSearchDialog::IsOtherOptionsExpanded() )
-        m_xOtherOptionsExpander->set_expanded( true );
     ApplyTransliterationFlags_Impl( pSearchItem->GetTransliterationFlags() );
 
     ShowOptionalControls_Impl();
@@ -1754,8 +1752,12 @@ void SvxSearchDialog::EnableControls_Impl( const 
SearchOptionFlags nFlags )
     }
 
     if ( pSearchItem )
+    {
         Init_Impl( pSearchItem->GetPattern() &&
                    ( !pSearchList || !pSearchList->Count() ) );
+        if (SvxSearchDialog::IsOtherOptionsExpanded())
+            m_xOtherOptionsExpander->set_expanded(true);
+    }
 }
 
 void SvxSearchDialog::EnableControl_Impl(const weld::Widget& rCtrl)

Reply via email to