1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-26 09:37:56 +00:00

#4701 Table looks like it will accept drag-and-drop without a row

This commit is contained in:
Mitchell Livingston 2012-01-07 16:01:28 +00:00
parent b2f3bc7eaf
commit abc1852ff8

View file

@ -2875,6 +2875,9 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
} }
else else
{ {
if (index == NSOutlineViewDropOnItemIndex)
return NSDragOperationNone;
if (item) if (item)
{ {
index = [fTableView rowForItem: item] + 1; index = [fTableView rowForItem: item] + 1;
@ -2889,7 +2892,6 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
return NSDragOperationNone; return NSDragOperationNone;
} }
#warning don't accept drop on overall group (without groups, or maybe with?)
- (BOOL) outlineView: (NSOutlineView *) outlineView acceptDrop: (id < NSDraggingInfo >) info item: (id) item childIndex: (NSInteger) newRow - (BOOL) outlineView: (NSOutlineView *) outlineView acceptDrop: (id < NSDraggingInfo >) info item: (id) item childIndex: (NSInteger) newRow
{ {
NSPasteboard * pasteboard = [info draggingPasteboard]; NSPasteboard * pasteboard = [info draggingPasteboard];