Changeset 6350
- Timestamp:
- 11/15/08 16:26:07 (2 months ago)
- Files:
-
- trunk/Spiral/SPPlaylistController.m (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Spiral/SPPlaylistController.m
r6329 r6350 1142 1142 NSString *path; 1143 1143 id item, parentItem; 1144 NSDragOperation operation; 1144 1145 1145 1146 if(childItem && ![childItem isKindOfClass:[SPPlaylistGroup class]]) … … 1149 1150 types = [pasteboard types]; 1150 1151 1151 if([types containsObject:SPPlaylistItemPboardType] && childItem) { 1152 if([types containsObject:SPPlaylistItemPboardType]) { 1153 operation = [[NSApp currentEvent] alternateKeyModifier] ? NSDragOperationCopy : NSDragOperationMove; 1154 1152 1155 for(item in [NSKeyedUnarchiver unarchiveObjectWithData:[pasteboard dataForType:SPPlaylistItemPboardType]]) { 1153 1156 parentItem = childItem; … … 1157 1160 return NSDragOperationNone; 1158 1161 } while((parentItem = [parentItem parentItem])); 1162 1163 if([item isKindOfClass:[SPPlaylistRepresentedFile class]]) 1164 operation = NSDragOperationCopy; 1159 1165 } 1166 1167 return operation; 1160 1168 } 1161 1169 else if([types containsObject:NSFilenamesPboardType]) { … … 1166 1174 } 1167 1175 } 1168 } 1169 1170 return NSDragOperationCopy; 1176 1177 return NSDragOperationCopy; 1178 } 1179 1180 return NSDragOperationNone; 1171 1181 } 1172 1182 … … 1196 1206 newItem = item; 1197 1207 1198 [(SPPlaylistGroup *) [newItem parentItem] removeItem:newItem]; 1208 if([[newItem parentItem] isKindOfClass:[SPPlaylistGroup class]] && ![[NSApp currentEvent] alternateKeyModifier]) 1209 [(SPPlaylistGroup *) [newItem parentItem] removeItem:newItem]; 1199 1210 1200 1211 if(index >= 0 && (NSUInteger) index < [group numberOfItems])
