Changeset 24425
- Timestamp:
- 07/18/2008 01:53:28 PM (6 months ago)
- Files:
-
- trunk/Source/AIListController.m (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Source/AIListController.m
r24109 r24425 592 592 [[outlineView dataSource] outlineView:outlineView numberOfChildrenOfItem:itemAboveProposedIndex] : 593 593 NSOutlineViewDropOnItemIndex); 594 595 594 [outlineView setDropItem:itemAboveProposedIndex 596 595 dropChildIndex:index]; … … 610 609 * This should retarget to combine the dragged contact with the metacontact. 611 610 */ 612 [outlineView setDropItem:[(AIListContact *)item parentContact] dropChildIndex:NSOutlineViewDropOnItemIndex]; 611 [outlineView setDropItem:[(AIListContact *)item parentContact] 612 dropChildIndex:NSOutlineViewDropOnItemIndex]; 613 613 } 614 614 … … 635 635 */ 636 636 [outlineView setDropItem:item dropChildIndex:indexForInserting]; 637 } else { 638 /* A drop just below a metacontact will appear to be in the group (and should be). 639 * Adjust to fit reality accordingly. 640 */ 641 if (item && [item isKindOfClass:[AIMetaContact class]]) { 642 BOOL isExpanded = [outlineView isItemExpanded:item]; 643 if ((isExpanded && (index == [[outlineView dataSource] outlineView:outlineView 644 numberOfChildrenOfItem:item])) || 645 (!isExpanded && (index != NSOutlineViewDropOnItemIndex))) { 646 [outlineView setDropItem:[item containingObject] 647 dropChildIndex:([[item containingObject] indexOfObject:item] + 1)]; 648 } 649 } 637 650 } 638 651 } … … 680 693 NSPasteboard *draggingPasteboard = [info draggingPasteboard]; 681 694 NSString *availableType; 682 695 683 696 if ((availableType = [draggingPasteboard availableTypeFromArray:[NSArray arrayWithObject:@"AIListObject"]])) { 684 697 //Kill the selection now, (in a more finder-esque way)