summaryrefslogtreecommitdiff
path: root/sc/source/ui/navipi
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-03-22 16:58:59 +0000
committerCaolán McNamara <caolanm@redhat.com>2021-03-23 09:45:40 +0100
commit6472f8444717f0567c69ab62b93c7437d02b0226 (patch)
treee6e0afd725f4162da598e5789d8a330fe4366684 /sc/source/ui/navipi
parentad37c9a2a832c494b98ce7cf39400ddaa4ffdda1 (diff)
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@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/source/ui/navipi')
-rw-r--r--sc/source/ui/navipi/content.cxx14
1 files changed, 13 insertions, 1 deletions
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;