|
@@ -2149,9 +2149,7 @@ bool Control::has_focus() const {
|
|
|
|
|
|
void Control::grab_focus() {
|
|
|
|
|
|
- if (!is_inside_tree()) {
|
|
|
- ERR_FAIL_COND(!is_inside_tree());
|
|
|
- }
|
|
|
+ ERR_FAIL_COND(!is_inside_tree());
|
|
|
|
|
|
if (data.focus_mode == FOCUS_NONE) {
|
|
|
WARN_PRINT("This control can't grab focus. Use set_focus_mode() to allow a control to get focus.");
|