sc/source/ui/cctrl/checklistmenu.cxx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-)
New commits: commit d1b034f9c480ada0bf7d5d2cfc18d1ef12409bae Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Mon Jul 12 17:34:11 2021 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Tue Jul 13 09:59:42 2021 +0200 move freeze/thaw so we don't select while frozen Change-Id: I4f4b3e5ac3e7e842726780f9c773389f7c39ce7f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118787 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx index 4b8ce2e4e114..4a6c0dea209c 100644 --- a/sc/source/ui/cctrl/checklistmenu.cxx +++ b/sc/source/ui/cctrl/checklistmenu.cxx @@ -703,12 +703,12 @@ IMPL_LINK_NOARG(ScCheckListMenuControl, EdModifyHdl, weld::Entry&, void) size_t n = maMembers.size(); size_t nSelCount = 0; - mpChecks->freeze(); - // This branch is the general case, the other is an optimized variant of // this one where we can take advantage of knowing we have no hierarchy if (mbHasDates) { + mpChecks->freeze(); + bool bSomeDateDeletes = false; for (size_t i = 0; i < n; ++i) @@ -767,13 +767,19 @@ IMPL_LINK_NOARG(ScCheckListMenuControl, EdModifyHdl, weld::Entry&, void) updateMemberParents(nullptr, i); } } + + mpChecks->thaw(); } else { + mpChecks->freeze(); + // when there are a lot of rows, it is cheaper to simply clear the tree and either // re-initialise or just insert the filtered lines mpChecks->clear(); + mpChecks->thaw(); + if (bSearchTextEmpty) nSelCount = initMembers(); else @@ -806,9 +812,6 @@ IMPL_LINK_NOARG(ScCheckListMenuControl, EdModifyHdl, weld::Entry&, void) } } - - mpChecks->thaw(); - if ( nSelCount == n ) mxChkToggleAll->set_state( TRISTATE_TRUE ); else if ( nSelCount == 0 ) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits