diff --git a/game/addons/mat_maker_gd/widgets/gradient_editor/gradient_editor.gd b/game/addons/mat_maker_gd/widgets/gradient_editor/gradient_editor.gd index 180a2cd1..f100e3d1 100644 --- a/game/addons/mat_maker_gd/widgets/gradient_editor/gradient_editor.gd +++ b/game/addons/mat_maker_gd/widgets/gradient_editor/gradient_editor.gd @@ -199,7 +199,7 @@ func _gui_input(ev) -> void: var popup_size = popup.rect_size popup.popup(Rect2(ev.global_position, Vector2(0, 0))) popup.set_global_position(ev.global_position-Vector2(popup_size.x / 2, popup_size.y)) - popup.init(value) + popup.init(value, graph_node, _undo_redo) popup.connect("updated", self, "set_value") popup.connect("popup_hide", popup, "queue_free") diff --git a/game/addons/mat_maker_gd/widgets/gradient_editor/gradient_popup.gd b/game/addons/mat_maker_gd/widgets/gradient_editor/gradient_popup.gd index d45a20c0..466c12cc 100644 --- a/game/addons/mat_maker_gd/widgets/gradient_editor/gradient_popup.gd +++ b/game/addons/mat_maker_gd/widgets/gradient_editor/gradient_popup.gd @@ -3,7 +3,9 @@ extends Popup signal updated(value) -func init(value) -> void: +func init(value, graph_node, undo_redo) -> void: + $Panel/Control.set_undo_redo(undo_redo) + $Panel/Control.graph_node = graph_node $Panel/Control.set_value(value) func _on_Control_updated(value) -> void: