Merge pull request #41002 from AlphaOneProject/issue-40879

Modify the scene only when color changed
This commit is contained in:
Rémi Verschelde 2020-08-11 19:09:11 +02:00 committed by GitHub
commit 149dbfc144
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);
}