From 994c0b7ce5d6bd6fb6ae127724de526e6d92d46c Mon Sep 17 00:00:00 2001 From: FireForge <67974470+fire-forge@users.noreply.github.com> Date: Wed, 20 Apr 2022 15:41:30 -0500 Subject: [PATCH] Fix UndoRedo in Gradient editor (cherry picked from commit a384031326b96dd1185b7ba33809660ba5551549) --- editor/plugins/gradient_editor_plugin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editor/plugins/gradient_editor_plugin.cpp b/editor/plugins/gradient_editor_plugin.cpp index a25ce7bffcc..1f3ccb02162 100644 --- a/editor/plugins/gradient_editor_plugin.cpp +++ b/editor/plugins/gradient_editor_plugin.cpp @@ -51,7 +51,7 @@ void GradientEditor::_gradient_changed() { void GradientEditor::_ramp_changed() { editing = true; UndoRedo *undo_redo = EditorNode::get_singleton()->get_undo_redo(); - undo_redo->create_action(TTR("Gradient Edited")); + undo_redo->create_action(TTR("Gradient Edited"), UndoRedo::MERGE_ENDS); undo_redo->add_do_method(gradient.ptr(), "set_offsets", get_offsets()); undo_redo->add_do_method(gradient.ptr(), "set_colors", get_colors()); undo_redo->add_undo_method(gradient.ptr(), "set_offsets", gradient->get_offsets());