[Libreoffice-commits] core.git: vcl/source
Jim Raykowski (via logerrit)
logerrit at kemper.freedesktop.org
Thu Apr 2 08:25:49 UTC 2020
vcl/source/app/salvtables.cxx | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
New commits:
commit 2c15856b0a7ea789844d8f37633bea57ebee72db
Author: Jim Raykowski <raykowj at gmail..com>
AuthorDate: Tue Mar 24 03:36:57 2020 -0800
Commit: Jim Raykowski <raykowj at gmail.com>
CommitDate: Thu Apr 2 10:25:15 2020 +0200
tdf#131586 Keep Writer Navigator content view vertical scroll position
Change-Id: Ic968a3c6b80e13077a6b9a0cb05a8181723f29f7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90979
Tested-by: Jenkins
Reviewed-by: Jim Raykowski <raykowj at gmail.com>
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 0c5d94fbf09e..d43dda8ffec1 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -4554,13 +4554,23 @@ public:
virtual int vadjustment_get_value() const override
{
- ScrollBar* pVertScrollBar = m_xTreeView->GetVScroll();
- return pVertScrollBar->GetThumbPos();
+ int nValue = -1;
+ const SvTreeListEntry* pEntry = m_xTreeView->GetFirstEntryInView();
+ if (pEntry)
+ nValue = m_xTreeView->GetAbsPos(pEntry);
+ return nValue;
}
virtual void vadjustment_set_value(int nValue) override
{
+ if (nValue == -1)
+ return;
+ bool bUpdate = m_xTreeView->IsUpdateMode();
+ if (bUpdate)
+ m_xTreeView->SetUpdateMode(false);
m_xTreeView->ScrollToAbsPos(nValue);
+ if (bUpdate)
+ m_xTreeView->SetUpdateMode(true);
}
virtual ~SalInstanceTreeView() override
More information about the Libreoffice-commits
mailing list