mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-07 17:38:02 +00:00
CPCollectionView dragging: fix a bug where the dragging view was created from content instead of selection
This commit is contained in:
1 parent
8641738777
commit
57c8d223ad
1 file changed
+3
-2
@@ -722,10 +722,11 @@
|
||||
|
||||
- (CPView)draggingViewForItemsAtIndexes:(CPIndexSet)indexes withEvent:(CPEvent)event offset:(CGPoint)dragImageOffset
|
||||
{
|
||||
var idx = _content[[indexes firstIndex]];
|
||||
if (!_itemForDragging)
|
||||
_itemForDragging = [self newItemForRepresentedObject:_content[0]];
|
||||
_itemForDragging = [self newItemForRepresentedObject:idx];
|
||||
else
|
||||
[_itemForDragging setRepresentedObject:_content[[indexes firstIndex]]];
|
||||
[_itemForDragging setRepresentedObject:idx];
|
||||
|
||||
return [_itemForDragging view];
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user