You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-22 15:06:45 +00:00
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
(cherry picked from commit f3626364fc)
This commit is contained in:
committed by
Rémi Verschelde
parent
cea16907bb
commit
3211a51be8
@@ -1885,6 +1885,10 @@ EditorPropertyTransform::EditorPropertyTransform() {
|
|||||||
////////////// COLOR PICKER //////////////////////
|
////////////// COLOR PICKER //////////////////////
|
||||||
|
|
||||||
void EditorPropertyColor::_color_changed(const Color &p_color) {
|
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);
|
emit_changed(get_edited_property(), p_color, "", true);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user