summaryrefslogtreecommitdiff
path: root/editor/plugins
diff options
context:
space:
mode:
authorJFonS <JFonS@users.noreply.github.com>2022-02-14 10:42:46 +0100
committerGitHub <noreply@github.com>2022-02-14 10:42:46 +0100
commit8317753c24f6a05d4fdc8541fecf1cd2ec189b41 (patch)
treec0628fd90cb116d5178c1c827abb94c1d1f731f0 /editor/plugins
parent58199e5ad009ca6a4995b4dcfd863becd82d6f02 (diff)
parent55fda17742f85309aba5a60a2a969a5565d944b9 (diff)
Merge pull request #57964 from mbrlabs/deselect
Deselect nodes in the 3D editor when pressing ESC
Diffstat (limited to 'editor/plugins')
-rw-r--r--editor/plugins/node_3d_editor_plugin.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp
index fc2555d93a..8bcc220c8f 100644
--- a/editor/plugins/node_3d_editor_plugin.cpp
+++ b/editor/plugins/node_3d_editor_plugin.cpp
@@ -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;