Open only one file browser for commits

This commit is contained in:
bleeptrack 2020-10-27 12:15:45 +01:00
parent 5ab98677bd
commit 10a130a913
2 changed files with 11 additions and 1 deletions

View file

@ -121,6 +121,8 @@ func _input(event):
var dist = get_viewport().get_mouse_position() - start_pos
print(dist.length())
if dist.length() < 3:
file_browser.visible = not file_browser.visible
var state = file_browser.visible
repository.close_all_file_browsers()
file_browser.visible = not state
start_pos = null

View file

@ -342,3 +342,11 @@ func set_file_browser_active(active):
file_browser_active = active
if file_browser:
file_browser.visible = active
func close_all_file_browsers():
var all = all_objects()
for o in objects.values():
if o.type == "commit":
o.file_browser.visible = false