tibirna / qgit

Official git repository for QGit.
Other
174 stars 68 forks source link

Fixed browsing files history. #20

Closed deveee closed 6 years ago

deveee commented 6 years ago

This is a regression since 2fed338fd4c8c9bf147beeca7018ff2a946dbfb3.

We can't just clear current file name, because it's useful in some cases. For example if you browse commits for particular file that was selected in the left panel.

As far as I understand the goal is to open "Log" tab when different commit is pressed and open "Diff" tab when different filename is selected. This can be achieved by checking if sha has been changed.

Fixes #11

deveee commented 6 years ago

If you want to clear file name when commit was changed, then you can add

            if (sha_changed)
                st.setFileName("");

in the resview.cpp. But I personally don't like it.

tibirna commented 6 years ago

Excellent catch and fix! Thanks!