Skip to content

Commit

Permalink
Set selected item value when current selected Xcode not found. And ad…
Browse files Browse the repository at this point in the history
…d assertion.
  • Loading branch information
watr committed Aug 19, 2014
1 parent e2a3732 commit b15f1f7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Xcode-Selector/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,10 @@ - (void)reload
XcodeItem *item = [XcodeItem itemWithXcodeApplicationPath:selectedXcodePath];
item.selected = YES;
[self.xcodeItemsController addObject:item];
[self.xcodeItemsController setSelectedObjects:@[item]];
selectedItem = item;
}

NSAssert(selectedItem != nil, @"selected item is nil");
[self.xcodeItemsController rearrangeObjects];
[self.xcodeItemsController setSelectedObjects:@[selectedItem]];
}
Expand Down

0 comments on commit b15f1f7

Please sign in to comment.