Merge pull request #66355 from Mickeon/fix-color-picker-always-color-changed

Fix ColorPicker always emitting color_changed on html submit
This commit is contained in:
Rémi Verschelde
2022-09-24 23:00:19 +02:00
committed by GitHub

View File

@ -427,12 +427,15 @@ void ColorPicker::_html_submitted(const String &p_html) {
return;
}
float last_alpha = color.a;
Color previous_color = color;
color = Color::html(p_html);
if (!is_editing_alpha()) {
color.a = last_alpha;
color.a = previous_color.a;
}
if (color == previous_color) {
return;
}
if (!is_inside_tree()) {
return;
}