Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions material_maker/panels/graph_edit/graph_edit.gd
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,8 @@ func _gui_input(event) -> void:
if event.pressed:
var scancode_with_modifiers = event.get_keycode_with_modifiers()
match scancode_with_modifiers:
KEY_H:
minimize_selection()
KEY_DELETE,KEY_BACKSPACE:
remove_selection()
KEY_LEFT:
Expand Down Expand Up @@ -668,6 +670,11 @@ func remove_selection() -> void:
var next = generator.serialize()
undoredo_create_step("Delete nodes", generator.get_hier_name(), prev, next)

func minimize_selection() -> void:
for c in get_children():
if c is GraphElement and c.selected:
c.on_minimize_pressed()

# Maybe move this to gen_graph...
func serialize_selection(nodes = []) -> Dictionary:
var data = { nodes = [], connections = [] }
Expand Down