From 7254284efdef8d99405b2c8ffb9ef7ab35daf14e Mon Sep 17 00:00:00 2001 From: miwanczuk Date: Sat, 10 Aug 2019 00:46:31 +0200 Subject: [PATCH] Adds support for undo/redo for in-editor color picker --- editor/plugins/script_text_editor.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp index 284e0b3d97a..ddb87b200d1 100644 --- a/editor/plugins/script_text_editor.cpp +++ b/editor/plugins/script_text_editor.cpp @@ -1621,7 +1621,9 @@ void ScriptTextEditor::_color_changed(const Color &p_color) { line_with_replaced_args = line_with_replaced_args.insert(color_args_pos, new_args); color_args = new_args; + code_editor->get_text_edit()->begin_complex_operation(); code_editor->get_text_edit()->set_line(color_position.x, line_with_replaced_args); + code_editor->get_text_edit()->end_complex_operation(); code_editor->get_text_edit()->update(); }