Merge pull request #57964 from mbrlabs/deselect

Deselect nodes in the 3D editor when pressing ESC
This commit is contained in:
JFonS 2022-02-14 10:42:46 +01:00 committed by GitHub
commit 8317753c24
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1889,7 +1889,12 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
}
}
if (_edit.mode != TRANSFORM_NONE) {
if (_edit.mode == TRANSFORM_NONE) {
if (k->get_keycode() == Key::ESCAPE && !cursor.region_select) {
_clear_selected();
return;
}
} else {
// We're actively transforming, handle keys specially
TransformPlane new_plane = TRANSFORM_VIEW;
String new_message;