[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - sc/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Wed Jul 14 07:15:52 UTC 2021
sc/source/ui/cctrl/checklistmenu.cxx | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
New commits:
commit 636742269af45ea82f5d5ebf25a04dc8e152ed34
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Jul 12 17:34:11 2021 +0100
Commit: Eike Rathke <erack at redhat.com>
CommitDate: Wed Jul 14 09:15:18 2021 +0200
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 at redhat.com>
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 )
More information about the Libreoffice-commits
mailing list