소스 검색

Unfocus Control on NOTIFICATION_EXIT_TREE

(cherry picked from commit be2d59fa0a77d60b19748a304fb74c386dd8e114)
PucklaMotzer09 3 년 전
부모
커밋
05eb33e701
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      scene/gui/control.cpp

+ 1 - 1
scene/gui/control.cpp

@@ -472,7 +472,7 @@ void Control::_notification(int p_notification) {
 		} break;
 		case NOTIFICATION_EXIT_TREE: {
 			ERR_FAIL_COND(!get_viewport());
-
+			release_focus();
 			get_viewport()->_gui_remove_control(this);
 
 		} break;