mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-12-24 04:46:48 +01:00
Fix ColorPicker always emitting color_changed on html submit
The color change was always emitted when the the modal was closed, even if it was exactly the same as before. (cherry picked from commit 544727ac1ea7616c9f44116360d038cfcda5f763)
This commit is contained in:
parent
8f0e3af2a2
commit
a0c1c54db1
@ -208,12 +208,15 @@ void ColorPicker::_html_entered(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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user