mirror of
https://github.com/git-learning-game/oh-my-git.git
synced 2024-11-22 16:20:19 +01:00
Properly sync simplify view checkbox
This commit is contained in:
parent
86e4af0cdf
commit
613b1b9852
1 changed files with 5 additions and 7 deletions
|
@ -101,9 +101,6 @@ func update_objects():
|
||||||
continue
|
continue
|
||||||
|
|
||||||
var type = object_type(o)
|
var type = object_type(o)
|
||||||
if simplified_view:
|
|
||||||
if type == "tree" or type == "blob":
|
|
||||||
continue
|
|
||||||
|
|
||||||
var n = node.instance()
|
var n = node.instance()
|
||||||
n.id = o
|
n.id = o
|
||||||
|
@ -126,7 +123,7 @@ func update_objects():
|
||||||
|
|
||||||
_commit_count += 1
|
_commit_count += 1
|
||||||
if _commit_count >= 3 and not simplified_view:
|
if _commit_count >= 3 and not simplified_view:
|
||||||
simplified_view = true
|
set_simplified_view(true)
|
||||||
"tag":
|
"tag":
|
||||||
n.children = tag_target(o)
|
n.children = tag_target(o)
|
||||||
|
|
||||||
|
@ -134,6 +131,10 @@ func update_objects():
|
||||||
nodes.add_child(n)
|
nodes.add_child(n)
|
||||||
objects[o] = n
|
objects[o] = n
|
||||||
|
|
||||||
|
if simplified_view:
|
||||||
|
if type == "tree" or type == "blob":
|
||||||
|
n.hide()
|
||||||
|
|
||||||
func update_node_positions():
|
func update_node_positions():
|
||||||
if there_is_a_git():
|
if there_is_a_git():
|
||||||
var graph_text = shell.run("git log --graph --oneline --all --no-abbrev")
|
var graph_text = shell.run("git log --graph --oneline --all --no-abbrev")
|
||||||
|
@ -310,9 +311,6 @@ func set_simplified_view(simplify):
|
||||||
if obj.type == "tree" or obj.type == "blob":
|
if obj.type == "tree" or obj.type == "blob":
|
||||||
obj.visible = not simplify
|
obj.visible = not simplify
|
||||||
|
|
||||||
if there_is_a_git():
|
|
||||||
update_objects()
|
|
||||||
|
|
||||||
func set_editable_path(editable):
|
func set_editable_path(editable):
|
||||||
editable_path = editable
|
editable_path = editable
|
||||||
if label_node:
|
if label_node:
|
||||||
|
|
Loading…
Reference in a new issue