diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-10-27 14:07:05 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-10-27 17:41:00 +0100 |
commit | b8e38e458d47ce55432cda7aa03d665a462f2391 (patch) | |
tree | e4d854ef53ee1ce8c811e49f8edeac470e0cb64a /fpicker | |
parent | b9405fbc4e19901c78d136895c5ab0437d8450ac (diff) |
Resolves: tdf#137575 fpicker custom sorting setting not restored
Change-Id: Id5fae909a12621f68eb8defcb01b91c304c61df6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104888
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'fpicker')
-rw-r--r-- | fpicker/source/office/fileview.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/fpicker/source/office/fileview.cxx b/fpicker/source/office/fileview.cxx index 49934cc1a028..184a330d2830 100644 --- a/fpicker/source/office/fileview.cxx +++ b/fpicker/source/office/fileview.cxx @@ -1098,8 +1098,8 @@ OUString SvtFileView::GetConfigString() const void SvtFileView::SetConfigString(const OUString& rCfgStr) { sal_Int32 nIdx = 0; - mpImpl->mnSortColumn = static_cast<sal_uInt16>(rCfgStr.getToken( 0, ';', nIdx ).toInt32()); - mpImpl->mbAscending = static_cast<bool>(static_cast<sal_uInt16>(rCfgStr.getToken( 0, ';', nIdx ).toInt32())); + sal_uInt16 nSortColumn = static_cast<sal_uInt16>(rCfgStr.getToken( 0, ';', nIdx ).toInt32()); + bool bAscending = static_cast<bool>(static_cast<sal_uInt16>(rCfgStr.getToken( 0, ';', nIdx ).toInt32())); std::vector<int> aWidths(mpImpl->mxView->TypeColumnVisible() ? 4 : 3, -1); @@ -1120,6 +1120,9 @@ void SvtFileView::SetConfigString(const OUString& rCfgStr) weld::TreeView* pView = mpImpl->mxView->getWidget(); pView->set_column_fixed_widths(aWidths); + if (mpImpl->mnSortColumn != nSortColumn) + pView->set_sort_indicator(TRISTATE_INDET, mpImpl->GetSortColumn()); + mpImpl->Resort_Impl(nSortColumn, bAscending); } SvtFileView_Impl::SvtFileView_Impl(SvtFileView* pAntiImpl, weld::Window* pTopLevel, |