summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-08-10 12:35:59 +0200
committerGitHub <noreply@github.com>2019-08-10 12:35:59 +0200
commit3418f76a9eab9f496e5b26310bd3bc1125b8119b (patch)
treece84d71ae7b879fd3e07268c97966be6ef86b54a
parent3c7327da332c6bf56f8c2a8e601a13fa718ede05 (diff)
parent7254284efdef8d99405b2c8ffb9ef7ab35daf14e (diff)
Merge pull request #31255 from iwek7/colorPickerUndo
Adds support for undo/redo for in-editor color picker
-rw-r--r--editor/plugins/script_text_editor.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp
index 284e0b3d97..ddb87b200d 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();
}