Show commit ID in file browser

This commit is contained in:
blinry 2020-10-29 17:39:26 +01:00
parent 617adc8e06
commit e7842fb4ee
2 changed files with 2 additions and 1 deletions

View file

@ -108,6 +108,7 @@ func _set_commit(new_commit):
func _set_mode(new_mode): func _set_mode(new_mode):
mode = new_mode mode = new_mode
if save_button: if save_button:
save_button.visible = mode == FileBrowserMode.WORKING_DIRECTORY save_button.visible = mode == FileBrowserMode.WORKING_DIRECTORY
text_edit.readonly = not mode == FileBrowserMode.WORKING_DIRECTORY text_edit.readonly = not mode == FileBrowserMode.WORKING_DIRECTORY

View file

@ -69,7 +69,7 @@ func type_set(new_type):
type = new_type type = new_type
if type == "commit" and file_browser: if type == "commit" and file_browser:
file_browser.commit = self file_browser.commit = self
file_browser.title = "Commit" file_browser.title = "Commit " + id
if type != "ref": if type != "ref":
$ID.text = $ID.text.substr(0,8) $ID.text = $ID.text.substr(0,8)
z_index = -1 z_index = -1