mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 07:53:26 +00:00
Merge pull request #111248 from J4RH/colorpicker-reverting-fix
Check that ColorPickerButton popup is currently open in `_modal_closed()`
This commit is contained in:
commit
dac4704447
1 changed files with 7 additions and 5 deletions
|
@ -2442,12 +2442,14 @@ void ColorPickerButton::_color_changed(const Color &p_color) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void ColorPickerButton::_modal_closed() {
|
void ColorPickerButton::_modal_closed() {
|
||||||
if (Input::get_singleton()->is_action_just_pressed(SNAME("ui_cancel"))) {
|
if (picker->is_visible_in_tree()) {
|
||||||
set_pick_color(picker->get_old_color());
|
if (Input::get_singleton()->is_action_just_pressed(SNAME("ui_cancel"))) {
|
||||||
emit_signal(SNAME("color_changed"), color);
|
set_pick_color(picker->get_old_color());
|
||||||
|
emit_signal(SNAME("color_changed"), color);
|
||||||
|
}
|
||||||
|
emit_signal(SNAME("popup_closed"));
|
||||||
|
set_pressed(false);
|
||||||
}
|
}
|
||||||
emit_signal(SNAME("popup_closed"));
|
|
||||||
set_pressed(false);
|
|
||||||
if (!get_tree()->get_root()->is_embedding_subwindows()) {
|
if (!get_tree()->get_root()->is_embedding_subwindows()) {
|
||||||
get_viewport()->set_disable_input(false);
|
get_viewport()->set_disable_input(false);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue