From f3626364fc97c6b0d4692d5e8d5c5f3aeddc3f17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20F=C3=A9lix?= Date: Mon, 3 Aug 2020 18:46:43 +0200 Subject: [PATCH] Modify the scene only when color changed Editor now changes a color in the inspector only when it is different from the current one. Solves fake unsaved changes in editor after using the ColorPicker. Resolves: #40879 --- editor/editor_properties.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp index daafe095ce9..dea76ac9974 100644 --- a/editor/editor_properties.cpp +++ b/editor/editor_properties.cpp @@ -2108,6 +2108,11 @@ EditorPropertyTransform::EditorPropertyTransform() { ////////////// COLOR PICKER ////////////////////// void EditorPropertyColor::_color_changed(const Color &p_color) { + // Cancel the color change if the current color is identical to the new one. + if (get_edited_object()->get(get_edited_property()) == p_color) { + return; + } + emit_changed(get_edited_property(), p_color, "", true); }