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:
commit
61c0cb712d
@ -427,12 +427,15 @@ void ColorPicker::_html_submitted(const String &p_html) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
float last_alpha = color.a;
|
Color previous_color = color;
|
||||||
color = Color::html(p_html);
|
color = Color::html(p_html);
|
||||||
if (!is_editing_alpha()) {
|
if (!is_editing_alpha()) {
|
||||||
color.a = last_alpha;
|
color.a = previous_color.a;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (color == previous_color) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!is_inside_tree()) {
|
if (!is_inside_tree()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user