summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-08-31 11:47:49 +0100
committerCaolán McNamara <caolanm@redhat.com>2020-09-05 11:32:23 +0200
commit6c75668ebf3062b087e83c7a3559448d4ceefdeb (patch)
treef64a49707e8a6a9517508dceec21dca4856264fc /sw
parent9311abf473dd8a3067a556ba1701be8a290f5c37 (diff)
Resolves: tdf#136189 don't try and sort until treeview is filled
Change-Id: Ic5ac71d88bab7627e14220912f4b9c935f2f1f26 and... Related: tdf#136189 don't assert on unsetting non-existing previous sort column Change-Id: If2330cc83ace9ec0133b99eec8c2f0be3919013e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101710 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> (cherry picked from commit c52ac477beefc46802148033adbca9edb9970ac1) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101967 Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/ui/misc/bookmark.cxx4
-rw-r--r--sw/source/uibase/misc/redlndlg.cxx4
2 files changed, 7 insertions, 1 deletions
diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx
index e5be414d7bdb..7267f5a059f4 100644
--- a/sw/source/ui/misc/bookmark.cxx
+++ b/sw/source/ui/misc/bookmark.cxx
@@ -367,7 +367,9 @@ IMPL_LINK(SwInsertBookmarkDlg, HeaderBarClick, int, nColumn, void)
}
else
{
- m_xBookmarksBox->set_sort_indicator(TRISTATE_INDET, m_xBookmarksBox->get_sort_column());
+ int nOldSortColumn = m_xBookmarksBox->get_sort_column();
+ if (nOldSortColumn != -1)
+ m_xBookmarksBox->set_sort_indicator(TRISTATE_INDET, nOldSortColumn);
m_xBookmarksBox->set_sort_column(nColumn);
}
diff --git a/sw/source/uibase/misc/redlndlg.cxx b/sw/source/uibase/misc/redlndlg.cxx
index 1fc7a359bbf6..807fa1633a2e 100644
--- a/sw/source/uibase/misc/redlndlg.cxx
+++ b/sw/source/uibase/misc/redlndlg.cxx
@@ -716,6 +716,8 @@ void SwRedlineAcceptDlg::InsertParents(SwRedlineTable::size_type nStart, SwRedli
pCurrRedline = nullptr;
rTreeView.freeze();
+ if (m_pTable->IsSorted())
+ rTreeView.make_unsorted();
for (SwRedlineTable::size_type i = nStart; i <= nEnd; i++)
{
const SwRangeRedline& rRedln = pSh->GetRedline(i);
@@ -762,6 +764,8 @@ void SwRedlineAcceptDlg::InsertParents(SwRedlineTable::size_type nStart, SwRedli
InsertChildren(pRedlineParent, rRedln, bHasRedlineAutoFormat);
}
rTreeView.thaw();
+ if (m_pTable->IsSorted())
+ rTreeView.make_sorted();
}
void SwRedlineAcceptDlg::CallAcceptReject( bool bSelect, bool bAccept )