don't call OnData() if OnEnter() rejected the drag (#9634)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54398 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -244,6 +244,7 @@ STDMETHODIMP wxIDropTarget::DragOver(DWORD grfKeyState,
|
|||||||
result = wxDragNone;
|
result = wxDragNone;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( result != wxDragNone ) {
|
||||||
// we need client coordinates to pass to wxWin functions
|
// we need client coordinates to pass to wxWin functions
|
||||||
if ( !ScreenToClient(m_hwnd, (POINT *)&pt) )
|
if ( !ScreenToClient(m_hwnd, (POINT *)&pt) )
|
||||||
{
|
{
|
||||||
@@ -253,6 +254,10 @@ STDMETHODIMP wxIDropTarget::DragOver(DWORD grfKeyState,
|
|||||||
*pdwEffect = ConvertDragResultToEffect(
|
*pdwEffect = ConvertDragResultToEffect(
|
||||||
m_pTarget->OnDragOver(pt.x, pt.y, result)
|
m_pTarget->OnDragOver(pt.x, pt.y, result)
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
*pdwEffect = DROPEFFECT_NONE;
|
||||||
|
}
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user