mirror of
https://github.com/git-learning-game/oh-my-git.git
synced 2024-11-20 16:20:18 +01:00
Open only one file browser for commits
This commit is contained in:
parent
5ab98677bd
commit
10a130a913
2 changed files with 11 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue