]> git.saurik.com Git - wxWidgets.git/commitdiff
if one clicks first on line 3 and then on line 1, the selection event is correct...
authorStefan Csomor <csomor@advancedconcepts.ch>
Wed, 26 May 2004 04:34:49 +0000 (04:34 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Wed, 26 May 2004 04:34:49 +0000 (04:34 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27450 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/checklst.cpp
src/mac/carbon/listbox.cpp

index 69f9d757951776f309548b5098cf3f1dab84d237..5fbc1f6c44df0f6d034b73957c112cbc653bda21 100644 (file)
@@ -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 );
                     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 ;
                 } 
 
                 break ;
index ae36062d4b54988e160cfd6e5e2dc21b7d0291fe..50e9f4445f58a2db943b4b52e8be048b14a65138 100644 (file)
@@ -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 );
                     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 ;
             }
                 } 
                 break ;
             }