diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-08-01 15:31:17 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-08-01 22:17:16 +0200 |
commit | 68bab1db3b0eaedd315ce7cea32a614f47607b9b (patch) | |
tree | 9f6e0c3ab17e44526d3c98dace15576e1fc252b6 /vcl | |
parent | 58212048ef59e60b15b6261afbb40af048d1a95a (diff) |
Resolves: tdf#126661 unexpected sort between freeze+thaw
Change-Id: Ibb6b404d32e38c72fb1ff4be73f3a5f116d55692
Reviewed-on: https://gerrit.libreoffice.org/76809
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/app/salvtables.cxx | 1 | ||||
-rw-r--r-- | vcl/unx/gtk3/gtk3gtkinst.cxx | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index 6db8e912378f..922828140e8c 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -3799,6 +3799,7 @@ public: virtual void make_sorted() override { + assert(m_xTreeView->IsUpdateMode() && "don't sort when frozen"); m_xTreeView->SetStyle(m_xTreeView->GetStyle() | WB_SORT); m_xTreeView->GetModel()->SetCompareHdl(LINK(this, SalInstanceTreeView, CompareHdl)); set_sort_order(true); diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index f06f818930ad..57ba84a75b8d 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -7157,6 +7157,8 @@ public: virtual void make_sorted() override { + // thaw wants to restore sort state of freeze + assert(gtk_tree_view_get_model(m_pTreeView) && "don't select when frozen"); m_xSorter.reset(new comphelper::string::NaturalStringSorter( ::comphelper::getProcessComponentContext(), Application::GetSettings().GetUILanguageTag().getLocale())); |