diff options
Diffstat (limited to 'scene/gui/control.cpp')
-rw-r--r-- | scene/gui/control.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index a7cc0d43b8..69e6d74292 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -5,8 +5,8 @@ /* GODOT ENGINE */ /* https://godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */ +/* Copyright (c) 2007-2022 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2022 Godot Engine contributors (cf. AUTHORS.md). */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ @@ -589,6 +589,7 @@ void Control::_notification(int p_notification) { _size_changed(); } break; case NOTIFICATION_EXIT_TREE: { + release_focus(); get_viewport()->_gui_remove_control(this); } break; case NOTIFICATION_READY: { |