Minor fix + cleanup.
This commit is contained in:
parent
e3e071a157
commit
10ca73f649
Binary file not shown.
|
Before Width: | Height: | Size: 71 KiB After Width: | Height: | Size: 71 KiB |
@ -147,7 +147,6 @@ const static CGFloat cellOffset = 40;
|
||||
|
||||
- (void)setItems:(NSArray *)theItems
|
||||
{
|
||||
NSLog(@"%s", __PRETTY_FUNCTION__);
|
||||
[items autorelease];
|
||||
[theItems retain];
|
||||
items = theItems;
|
||||
@ -312,7 +311,7 @@ const static CGFloat cellOffset = 40;
|
||||
}
|
||||
- (BOOL)performDragOperation:(id <NSDraggingInfo>)sender
|
||||
{
|
||||
NSLog(@"%s operation=%d", __PRETTY_FUNCTION__, sender.draggingSourceOperationMask);
|
||||
//NSLog(@"%s operation=%d", __PRETTY_FUNCTION__, sender.draggingSourceOperationMask);
|
||||
|
||||
int index = [self itemIndexForPoint:[self convertPoint:[sender draggingLocation] fromView:nil]];
|
||||
|
||||
|
||||
@ -303,7 +303,6 @@
|
||||
|
||||
- (void)inventoryView:(IJInventoryView *)theInventoryView selectedItemAtIndex:(int)itemIndex
|
||||
{
|
||||
NSLog(@"%s index=%d", _cmd, itemIndex);
|
||||
// Show the properties window for this item.
|
||||
IJInventoryItem *lastItem = propertiesViewController.item;
|
||||
|
||||
@ -314,8 +313,12 @@
|
||||
|
||||
NSArray *items = [self itemArrayForInventoryView:theInventoryView slotOffset:nil];
|
||||
IJInventoryItem *item = [items objectAtIndex:itemIndex];
|
||||
//NSLog(@"%s index=%d item=%@", _cmd, itemIndex, item);
|
||||
if (item.itemId == 0 || lastItem == item)
|
||||
{
|
||||
// Perhaps caused by a bug, but it seems to be possible for the window to not be invisible at this point,
|
||||
// so we will set the alpha value here to be sure.
|
||||
[propertiesWindow setAlphaValue:0.0];
|
||||
propertiesViewController.item = nil;
|
||||
return; // can't show info on nothing
|
||||
}
|
||||
@ -400,7 +403,6 @@
|
||||
}
|
||||
- (id)tableView:(NSTableView *)theTableView objectValueForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row
|
||||
{
|
||||
// TODO: Change this, because the row will not correspond once we support sorting.
|
||||
NSNumber *itemId = [filteredItemIds objectAtIndex:row];
|
||||
|
||||
if ([tableColumn.identifier isEqual:@"itemId"])
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user