Fix GridMap still drawing when Alt+Tabbing
(cherry picked from commit 9fbef6f7db
)
This commit is contained in:
parent
e05a7a4a4b
commit
dac54b6db3
@ -1098,6 +1098,16 @@ void GridMapEditor::_notification(int p_what) {
|
|||||||
options->set_icon(get_icon("GridMap", "EditorIcons"));
|
options->set_icon(get_icon("GridMap", "EditorIcons"));
|
||||||
search_box->set_right_icon(get_icon("Search", "EditorIcons"));
|
search_box->set_right_icon(get_icon("Search", "EditorIcons"));
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
|
case NOTIFICATION_WM_FOCUS_OUT: {
|
||||||
|
if (input_action == INPUT_PAINT) {
|
||||||
|
// Simulate mouse released event to stop drawing when editor focus exists.
|
||||||
|
Ref<InputEventMouseButton> release;
|
||||||
|
release.instance();
|
||||||
|
release->set_button_index(BUTTON_LEFT);
|
||||||
|
forward_spatial_input_event(nullptr, release);
|
||||||
|
}
|
||||||
|
} break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user