Skip to content

Commit

Permalink
Don't deselect commit in Map view if no commit is selected in side list
Browse files Browse the repository at this point in the history
  • Loading branch information
swisspol committed Oct 25, 2015
1 parent c1332f1 commit 0eee24e
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions GitUp/Application/Document.m
Original file line number Diff line number Diff line change
Expand Up @@ -1604,15 +1604,19 @@ - (void)unifiedReflogViewController:(GIUnifiedReflogViewController*)controller d

- (void)commitListViewControllerDidChangeSelection:(GICommitListViewController*)controller {
if (!_preventSelectionLoopback) {
_preventSelectionLoopback = YES;
GCHistoryCommit* commit = nil;
if (_searchView.superview) {
[_mapViewController selectCommit:_searchResultsViewController.selectedCommit];
commit = _searchResultsViewController.selectedCommit;
} else if (_tagsView.superview) {
[_mapViewController selectCommit:_tagsViewController.selectedCommit];
commit = _tagsViewController.selectedCommit;
} else if (_ancestorsView.superview) {
[_mapViewController selectCommit:_ancestorsViewController.selectedCommit];
commit = _ancestorsViewController.selectedCommit;
}
if (commit) { // Don't deselect commit in map if no commit is selected in the list
_preventSelectionLoopback = YES;
[_mapViewController selectCommit:commit];
_preventSelectionLoopback = NO;
}
_preventSelectionLoopback = NO;
}

if (((_searchView.superview && _searchResultsViewController.selectedResult) || (_tagsView.superview && _tagsViewController.selectedResult) || (_ancestorsView.superview && _ancestorsViewController.selectedResult)) && !_mapViewController.selectedCommit) {
Expand Down

0 comments on commit 0eee24e

Please sign in to comment.