Skip to content

Commit

Permalink
Merge pull request #20 from deveee/fix_11
Browse files Browse the repository at this point in the history
Fixed browsing files history.
  • Loading branch information
tibirna authored May 21, 2018
2 parents c219a0e + 9e746a2 commit 467c1db
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/listview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,6 @@ void ListView::currentChanged(const QModelIndex& index, const QModelIndex&) {
SCRef selRev = sha(index.row());
if (st->sha() != selRev) { // to avoid looping
st->setSha(selRev);
st->setFileName("");
st->setSelectItem(true);
UPDATE_DOMAIN(d);
}
Expand Down
3 changes: 2 additions & 1 deletion src/revsview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,8 @@ bool RevsView::doUpdate(bool force) {
}
if (st.isChanged() || force) {
// activate log or diff tab depending on file selection
tab()->tabLogDiff->setCurrentIndex(st.fileName().isEmpty() ? 0 : 1);
bool sha_changed = st.sha(true) != st.sha(false);
tab()->tabLogDiff->setCurrentIndex(sha_changed ? 0 : 1);
tab()->textEditDiff->centerOnFileHeader(st);
}

Expand Down

0 comments on commit 467c1db

Please sign in to comment.