X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/17f5d137d8dbd38c1542b6612631f5f9da145c9a..2fea6972c7975a59b3cb2470c3d320402dfa2f97:/src/osx/cocoa/dataview.mm diff --git a/src/osx/cocoa/dataview.mm b/src/osx/cocoa/dataview.mm index bff2560e35..be4074a36e 100644 --- a/src/osx/cocoa/dataview.mm +++ b/src/osx/cocoa/dataview.mm @@ -21,8 +21,8 @@ #include "wx/utils.h" #endif -#include "wx/osx/cocoa/dataview.h" #include "wx/osx/private.h" +#include "wx/osx/cocoa/dataview.h" #include "wx/renderer.h" // ============================================================================ @@ -603,6 +603,7 @@ outlineView:(NSOutlineView*)outlineView ::CFRelease(osxData); delete dataObjects; } + return dragSuccessful; } -(id) outlineView:(NSOutlineView*)outlineView @@ -705,7 +706,7 @@ outlineView:(NSOutlineView*)outlineView sortingColumnPtr:dvc->GetColumn([[newDescriptor key] intValue]) ascending:[newDescriptor ascending]] autorelease]]; } - [[outlineView dataSource] setSortDescriptors:wxSortDescriptors]; + [(wxCocoaOutlineDataSource*)[outlineView dataSource] setSortDescriptors:wxSortDescriptors]; // send first the event to wxWidgets that the sorting has changed so that // the program can do special actions before the sorting actually starts: @@ -1751,7 +1752,8 @@ outlineView:(NSOutlineView*)outlineView wxDataViewEvent event(wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED,dvc->GetId()); event.SetEventObject(dvc); - event.SetModel (dvc->GetModel()); + event.SetModel(dvc->GetModel()); + event.SetItem(dvc->GetSelection()); dvc->GetEventHandler()->ProcessEvent(event); }