From be1aa07f8a8194fa6c947dd39e0ac98a59498728 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Wed, 26 May 2004 04:34:49 +0000 Subject: [PATCH] if one clicks first on line 3 and then on line 1, the selection event is correct, but GetSelection on the listbox lags on selection event behind, therefore switch to PostEvent git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27450 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/carbon/checklst.cpp | 4 +++- src/mac/carbon/listbox.cpp | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/mac/carbon/checklst.cpp b/src/mac/carbon/checklst.cpp index 69f9d75795..5fbc1f6c44 100644 --- a/src/mac/carbon/checklst.cpp +++ b/src/mac/carbon/checklst.cpp @@ -106,7 +106,9 @@ static pascal void DataBrowserItemNotificationProc(ControlRef browser, DataBrow event.SetString( list->GetString(i) ); event.SetInt(i) ; event.SetExtraLong( list->HasMultipleSelection() ? message == kDataBrowserItemSelected : TRUE ); - list->GetEventHandler()->ProcessEvent(event) ; + wxPostEvent( list->GetEventHandler() , event ) ; + // direct notification is not always having the listbox GetSelection() having in synch with event + // list->GetEventHandler()->ProcessEvent(event) ; } break ; diff --git a/src/mac/carbon/listbox.cpp b/src/mac/carbon/listbox.cpp index ae36062d4b..50e9f4445f 100644 --- a/src/mac/carbon/listbox.cpp +++ b/src/mac/carbon/listbox.cpp @@ -106,7 +106,9 @@ static pascal void DataBrowserItemNotificationProc(ControlRef browser, DataBrow event.SetString( list->GetString(i) ); event.SetInt(i) ; event.SetExtraLong( list->HasMultipleSelection() ? message == kDataBrowserItemSelected : TRUE ); - list->GetEventHandler()->ProcessEvent(event) ; + wxPostEvent( list->GetEventHandler() , event ) ; + // direct notification is not always having the listbox GetSelection() having in synch with event + // list->GetEventHandler()->ProcessEvent(event) ; } break ; } -- 2.45.2