Permalink
Browse files

Fix in setSelectedMenuItem:, it calculated the index path wrongly.

  • Loading branch information...
1 parent 3898334 commit c7e20bdec8f54f34eedf226f1206506b2c79f4cb @dwarfland dwarfland committed Apr 3, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 GCJumpBar/GCJumpBar.m
View
@@ -383,8 +383,8 @@ - (NSMenuItem *)selectedMenuItem {
- (void)setSelectedMenuItem:(NSMenuItem *)selectedMenuItem {
NSIndexPath* indexPath = [NSIndexPath indexPathWithIndex:[selectedMenuItem.menu indexOfItem:selectedMenuItem]];
while (selectedMenuItem.parentItem != nil) {
- indexPath = [indexPath indexPathByAddingIndexInFront:[selectedMenuItem.menu indexOfItem:selectedMenuItem]];
selectedMenuItem = selectedMenuItem.parentItem;
+ indexPath = [indexPath indexPathByAddingIndexInFront:[selectedMenuItem.menu indexOfItem:selectedMenuItem]];
}
self.selectedIndexPath = indexPath;

0 comments on commit c7e20bd

Please sign in to comment.