From: Stefan Csomor Date: Thu, 21 Sep 2006 05:38:12 +0000 (+0000) Subject: getting out for 'addded' events early enough X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/cb305e1e9ff819725734250d3020c1a074ef8174 getting out for 'addded' events early enough git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41339 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/mac/carbon/listctrl_mac.cpp b/src/mac/carbon/listctrl_mac.cpp index 16981635c9..31dfaa7fa8 100644 --- a/src/mac/carbon/listctrl_mac.cpp +++ b/src/mac/carbon/listctrl_mac.cpp @@ -1269,6 +1269,12 @@ void wxMacListCtrlItem::Notification(wxMacDataItemBrowserControl *owner , delete this; return; } + else if ( message == kDataBrowserItemAdded ) + { + // we don't issue events on adding, the item is not really stored in the list yet, so we + // avoid asserts by gettting out now + return ; + } wxListCtrl *list = wxDynamicCast( owner->GetPeer() , wxListCtrl ); if ( list ){