summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-03-22 16:58:59 +0000
committerAdolfo Jayme Barrientos <fitojb@ubuntu.com>2021-03-24 12:53:55 +0100
commit3c8c4d4976e977ab110b0b59941cce7b36603e55 (patch)
tree2609ae5a72803f6d14e0b2a9b0d2b2c6ad725cf7 /sc
parentb850105570d0e99644ff1ad5d6d0f09734db7952 (diff)
tdf#133159 store current config before changing sheet
Change-Id: I0c50c2fd145e80996d8aeddeabdb3ae5c4d83bbb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112805 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/inc/content.hxx2
-rw-r--r--sc/source/ui/navipi/content.cxx14
2 files changed, 14 insertions, 2 deletions
diff --git a/sc/source/ui/inc/content.hxx b/sc/source/ui/inc/content.hxx
index 53f234fdd145..1c0d2c27c4d5 100644
--- a/sc/source/ui/inc/content.hxx
+++ b/sc/source/ui/inc/content.hxx
@@ -165,7 +165,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 423bef3ef8a1..9383f343bfc0 100644
--- a/sc/source/ui/navipi/content.cxx
+++ b/sc/source/ui/navipi/content.cxx
@@ -333,7 +333,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:
@@ -1628,8 +1634,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;