[Libreoffice-commits] core.git: cui/source vcl/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Thu Oct 15 18:42:13 UTC 2020


 cui/source/options/optaboutconfig.cxx |    2 ++
 vcl/source/app/salvtables.cxx         |    7 ++++---
 2 files changed, 6 insertions(+), 3 deletions(-)

New commits:
commit da88a1b6bb48ea6f933e1121927d2dcaeae47866
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Oct 15 16:51:21 2020 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Oct 15 20:41:34 2020 +0200

    tdf#137432 only do EnableInvalidate(false) optimization when not shown
    
    Change-Id: If7f35d19061a7a2db2e5df31227834526bbf0905
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104381
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/cui/source/options/optaboutconfig.cxx b/cui/source/options/optaboutconfig.cxx
index c6348f2023ef..fdcef5cf853d 100644
--- a/cui/source/options/optaboutconfig.cxx
+++ b/cui/source/options/optaboutconfig.cxx
@@ -791,6 +791,7 @@ IMPL_LINK_NOARG( CuiAboutConfigTabPage, SearchHdl_Impl, weld::Button&, void)
 {
     weld::WaitObject aWait(m_xDialog.get());
 
+    m_xPrefBox->hide();
     m_xPrefBox->clear();
     m_xPrefBox->freeze();
 
@@ -844,6 +845,7 @@ IMPL_LINK_NOARG( CuiAboutConfigTabPage, SearchHdl_Impl, weld::Button&, void)
         m_xPrefBox->expand_row(rEntry);
         return false;
     });
+    m_xPrefBox->show();
 }
 
 void CuiAboutConfigTabPage::InsertEntry(const prefBoxEntry& rEntry)
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 29ecc5d74dc6..a1e533e2a2bd 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -3311,7 +3311,8 @@ namespace
         UpdateGuard(SvTabListBox& rTreeView)
             : m_rTreeView(rTreeView)
             , m_bOrigUpdate(m_rTreeView.IsUpdateMode())
-            , m_bOrigEnableInvalidate(m_rTreeView.GetModel()->IsEnableInvalidate())
+            // tdf#137432 only do the EnableInvalidate(false) optimization if the widget is currently hidden
+            , m_bOrigEnableInvalidate(!m_rTreeView.IsVisible() && m_rTreeView.GetModel()->IsEnableInvalidate())
         {
             if (m_bOrigUpdate)
                 m_rTreeView.SetUpdateMode(false);
@@ -3321,10 +3322,10 @@ namespace
 
         ~UpdateGuard()
         {
-            if (m_bOrigUpdate)
-                m_rTreeView.SetUpdateMode(true);
             if (m_bOrigEnableInvalidate)
                 m_rTreeView.GetModel()->EnableInvalidate(true);
+            if (m_bOrigUpdate)
+                m_rTreeView.SetUpdateMode(true);
         }
     };
 }


More information about the Libreoffice-commits mailing list