diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-09-24 23:00:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-24 23:00:19 +0200 |
commit | 61c0cb712d854881def4f266ca419de8c6fc6f37 (patch) | |
tree | fe2b8c7aae8a221079725eaf30cb7d3403710e68 /scene | |
parent | 39be6695d13dbea1a0d296839b54e34665e3ad02 (diff) | |
parent | 544727ac1ea7616c9f44116360d038cfcda5f763 (diff) |
Merge pull request #66355 from Mickeon/fix-color-picker-always-color-changed
Fix ColorPicker always emitting color_changed on html submit
Diffstat (limited to 'scene')
-rw-r--r-- | scene/gui/color_picker.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/scene/gui/color_picker.cpp b/scene/gui/color_picker.cpp index 4a1f2ab7c6..5751c54877 100644 --- a/scene/gui/color_picker.cpp +++ b/scene/gui/color_picker.cpp @@ -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; } |