[Libreoffice-commits] core.git: sc/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Tue Mar 23 08:46:29 UTC 2021


 sc/source/ui/inc/content.hxx    |    2 +-
 sc/source/ui/navipi/content.cxx |   14 +++++++++++++-
 2 files changed, 14 insertions(+), 2 deletions(-)

New commits:
commit 6472f8444717f0567c69ab62b93c7437d02b0226
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Mar 22 16:58:59 2021 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Mar 23 09:45:40 2021 +0100

    tdf#133159 store current config before changing sheet
    
    Change-Id: I0c50c2fd145e80996d8aeddeabdb3ae5c4d83bbb
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112924
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sc/source/ui/inc/content.hxx b/sc/source/ui/inc/content.hxx
index 70cf3fff38ba..c14856a89e5f 100644
--- a/sc/source/ui/inc/content.hxx
+++ b/sc/source/ui/inc/content.hxx
@@ -155,7 +155,7 @@ public:
     /** Applies the navigator settings to the listbox. */
     void ApplyNavigatorSettings(bool bRestoreScrollPos = false, int nScrollPos = 0);
     /** Stores the current listbox state in the navigator settings. */
-    void StoreNavigatorSettings() const;
+    void StoreNavigatorSettings();
 };
 
 #endif // INCLUDED_SC_SOURCE_UI_INC_CONTENT_HXX
diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx
index 90098d4fa68e..6a08e44b2186 100644
--- a/sc/source/ui/navipi/content.cxx
+++ b/sc/source/ui/navipi/content.cxx
@@ -336,7 +336,13 @@ IMPL_LINK_NOARG(ScContentTree, ContentDoubleClickHdl, weld::TreeView&, bool)
         switch( nType )
         {
             case ScContentId::TABLE:
+            {
+                // tdf#133159 store current config before changing sheet
+                // plausible that this should be done for all cases, but this
+                // is the known case that needs it
+                StoreNavigatorSettings();
                 pParentWindow->SetCurrentTableStr( aText );
+            }
             break;
 
             case ScContentId::RANGENAME:
@@ -1631,8 +1637,14 @@ void ScContentTree::ApplyNavigatorSettings(bool bRestorePos, int nScrollPos)
     }
 }
 
-void ScContentTree::StoreNavigatorSettings() const
+void ScContentTree::StoreNavigatorSettings()
 {
+    if (m_nAsyncMouseReleaseId)
+    {
+        Application::RemoveUserEvent(m_nAsyncMouseReleaseId);
+        m_nAsyncMouseReleaseId = nullptr;
+    }
+
     ScNavigatorSettings* pSettings = ScNavigatorDlg::GetNavigatorSettings();
     if( !pSettings )
         return;


More information about the Libreoffice-commits mailing list