summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-07-12 17:34:11 +0100
committerEike Rathke <erack@redhat.com>2021-07-14 09:15:18 +0200
commit636742269af45ea82f5d5ebf25a04dc8e152ed34 (patch)
tree2e6c5ff5db45c337d7eca1ad930936850a389803 /sc
parent7f9fde0132b326d5ff3335aae6985e71a8ccaf6d (diff)
move freeze/thaw so we don't select while frozen
Change-Id: I4f4b3e5ac3e7e842726780f9c773389f7c39ce7f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118793 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/cctrl/checklistmenu.cxx13
1 files changed, 8 insertions, 5 deletions
diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx
index 275873be1f32..95ab21cb74ae 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -704,12 +704,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)
@@ -768,13 +768,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
@@ -807,9 +813,6 @@ IMPL_LINK_NOARG(ScCheckListMenuControl, EdModifyHdl, weld::Entry&, void)
}
}
-
- mpChecks->thaw();
-
if ( nSelCount == n )
mxChkToggleAll->set_state( TRISTATE_TRUE );
else if ( nSelCount == 0 )