瀏覽代碼

Merge pull request #56255 from PucklaMotzer09/control_unfocus

Rémi Verschelde 3 年之前
父節點
當前提交
c0b3da78ad
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      scene/gui/control.cpp

+ 1 - 0
scene/gui/control.cpp

@@ -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: {