Skip to content

Commit c59d68b

Browse files
committed
Sidebar: Handle selection changes
1 parent 23d5c01 commit c59d68b

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

PBGitSidebarController.m

+15
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,21 @@ - (void)updateSelection
6969
[sourceView selectRow:index byExtendingSelection:NO];
7070
}
7171

72+
#pragma mark NSOutlineView delegate methods
73+
74+
- (void)outlineViewSelectionDidChange:(NSNotification *)notification
75+
{
76+
NSInteger index = [sourceView selectedRow];
77+
PBSourceViewItem *item = [sourceView itemAtRow:index];
78+
79+
if ([item revSpecifier]) {
80+
[[repository windowController] showHistoryView:self];
81+
repository.currentBranch = [item revSpecifier];
82+
return;
83+
}
84+
85+
/* Handle Remotes etc */
86+
}
7287

7388
#pragma mark NSOutlineView delegate methods
7489
- (BOOL)outlineView:(NSOutlineView *)outlineView isGroupItem:(id)item

0 commit comments

Comments
 (0)