diff --git a/PBCLIProxy.mm b/PBCLIProxy.mm index 4a9737c..479b7ec 100644 --- a/PBCLIProxy.mm +++ b/PBCLIProxy.mm @@ -53,10 +53,11 @@ if ([arguments count] > 0 && ([[arguments objectAtIndex:0] isEqualToString:@"--commit"] || [[arguments objectAtIndex:0] isEqualToString:@"-c"])) - ((PBGitWindowController *)document.windowController).selectedViewIndex = 1; + [((PBGitWindowController *)document.windowController) showCommitView:self]; else { PBGitRevSpecifier* rev = [[PBGitRevSpecifier alloc] initWithParameters:arguments]; document.currentBranch = [document addBranch: rev]; + [(PBGitWindowController *)document.windowController showHistoryView:self]; } [NSApp activateIgnoringOtherApps:YES]; diff --git a/PBGitWindowController.m b/PBGitWindowController.m index 1235620..7495b78 100644 --- a/PBGitWindowController.m +++ b/PBGitWindowController.m @@ -77,12 +77,14 @@ - (void) showCommitView:(id)sender { - self.selectedViewIndex = 1; + if (self.selectedViewIndex != 1) + self.selectedViewIndex = 1; } - (void) showHistoryView:(id)sender { - self.selectedViewIndex = 0; + if (self.selectedViewIndex != 0) + self.selectedViewIndex = 0; } #pragma mark -