adding translation of NSDragOperationGeneric to wxDragCopy fixes #14059
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70770 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -36,6 +36,8 @@ wxDragResult NSDragOperationToWxDragResult(NSDragOperation code)
|
|||||||
{
|
{
|
||||||
switch (code)
|
switch (code)
|
||||||
{
|
{
|
||||||
|
case NSDragOperationGeneric:
|
||||||
|
return wxDragCopy;
|
||||||
case NSDragOperationCopy:
|
case NSDragOperationCopy:
|
||||||
return wxDragCopy;
|
return wxDragCopy;
|
||||||
case NSDragOperationMove:
|
case NSDragOperationMove:
|
||||||
@@ -250,6 +252,23 @@ wxDragResult wxDropSource::DoDragDrop(int WXUNUSED(flags))
|
|||||||
result = NSDragOperationToWxDragResult([delegate code]);
|
result = NSDragOperationToWxDragResult([delegate code]);
|
||||||
[delegate release];
|
[delegate release];
|
||||||
[image release];
|
[image release];
|
||||||
|
|
||||||
|
wxWindow* mouseUpTarget = wxWindow::GetCapture();
|
||||||
|
|
||||||
|
if ( mouseUpTarget == NULL )
|
||||||
|
{
|
||||||
|
mouseUpTarget = m_window;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( mouseUpTarget != NULL )
|
||||||
|
{
|
||||||
|
wxMouseEvent wxevent(wxEVT_LEFT_DOWN);
|
||||||
|
((wxWidgetCocoaImpl*)mouseUpTarget->GetPeer())->SetupMouseEvent(wxevent , theEvent) ;
|
||||||
|
wxevent.SetEventType(wxEVT_LEFT_UP);
|
||||||
|
|
||||||
|
mouseUpTarget->HandleWindowEvent(wxevent);
|
||||||
|
}
|
||||||
|
|
||||||
gCurrentSource = NULL;
|
gCurrentSource = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user