forked from bartvdbraak/blender
Drag & drop from OS: set to accept any drop operation by default for now
This commit is contained in:
parent
afa872200c
commit
6cb02a1672
@ -110,8 +110,8 @@ ULONG __stdcall GHOST_DropTargetWin32::Release(void)
|
||||
*/
|
||||
HRESULT __stdcall GHOST_DropTargetWin32::DragEnter(IDataObject * pDataObject, DWORD grfKeyState, POINTL pt, DWORD * pdwEffect)
|
||||
{
|
||||
// we don't know yet if we accept the drop.
|
||||
m_window->setAcceptDragOperation(false);
|
||||
// we accept all drop by default
|
||||
m_window->setAcceptDragOperation(true);
|
||||
*pdwEffect = DROPEFFECT_NONE;
|
||||
|
||||
m_draggedObjectType = getGhostType(pDataObject);
|
||||
|
@ -167,7 +167,7 @@ extern "C" {
|
||||
else if ([[draggingPBoard types] containsObject:NSStringPboardType]) m_draggedObjectType = GHOST_kDragnDropTypeString;
|
||||
else return NSDragOperationNone;
|
||||
|
||||
associatedWindow->setAcceptDragOperation(FALSE); //Drag operation needs to be accepted explicitly by the event manager
|
||||
associatedWindow->setAcceptDragOperation(TRUE); //Drag operation is accepted by default
|
||||
systemCocoa->handleDraggingEvent(GHOST_kEventDraggingEntered, m_draggedObjectType, associatedWindow, mouseLocation.x, mouseLocation.y, nil);
|
||||
return NSDragOperationCopy;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user