From 4d02296e6a29b9184d16ff7eb7014c42de41c1f9 Mon Sep 17 00:00:00 2001 From: topic2k Date: Sat, 28 Mar 2015 19:50:07 +0100 Subject: [PATCH] Send COL_CHECKED event after checking/toggling childs. If in an event handler for EVT_LIST_COL_CHECKED the checked items are counted the result would be wrong. --- wx/lib/agw/ultimatelistctrl.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wx/lib/agw/ultimatelistctrl.py b/wx/lib/agw/ultimatelistctrl.py index 7c4a859b..c3de37b2 100644 --- a/wx/lib/agw/ultimatelistctrl.py +++ b/wx/lib/agw/ultimatelistctrl.py @@ -5616,8 +5616,6 @@ class UltimateListHeaderWindow(wx.Control): colItem.Check(not isChecked) self._owner.SetColumn(column, colItem) - evt = (self._isFooter and [wxEVT_COMMAND_LIST_FOOTER_CHECKED] or [wxEVT_COMMAND_LIST_COL_CHECKED])[0] - self.SendListEvent(evt, pos) self.RefreshRect(rect) if self._isFooter: @@ -5628,6 +5626,9 @@ class UltimateListHeaderWindow(wx.Control): elif parent.HasAGWFlag(ULC_AUTO_TOGGLE_CHILD): self._owner.AutoToggleChild(self._column) + evt = (self._isFooter and [wxEVT_COMMAND_LIST_FOOTER_CHECKED] or [wxEVT_COMMAND_LIST_COL_CHECKED])[0] + self.SendListEvent(evt, pos) + return True return False