summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-08-11 19:09:11 +0200
committerGitHub <noreply@github.com>2020-08-11 19:09:11 +0200
commit149dbfc144efd6d52f1a579280545114e0c6ed7b (patch)
treeec96a558148507fb62b5e5e9d23da20ef76c5653
parent7e19f217bdd09a4718563cfa64f9815b64ec7630 (diff)
parentf3626364fc97c6b0d4692d5e8d5c5f3aeddc3f17 (diff)
Merge pull request #41002 from AlphaOneProject/issue-40879
Modify the scene only when color changed
-rw-r--r--editor/editor_properties.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp
index daafe095ce..dea76ac997 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);
}