Browse Source

Merge pull request #58253 from mbrlabs/deselect-3x

Rémi Verschelde 3 năm trước cách đây
mục cha
commit
e2287a201a
1 tập tin đã thay đổi với 7 bổ sung0 xóa
  1. 7 0
      editor/plugins/spatial_editor_plugin.cpp

+ 7 - 0
editor/plugins/spatial_editor_plugin.cpp

@@ -2034,6 +2034,13 @@ void SpatialEditorViewport::_sinput(const Ref<InputEvent> &p_event) {
 			return;
 		}
 
+		if (_edit.mode == TRANSFORM_NONE && !cursor.region_select) {
+			if (k->get_scancode() == KEY_ESCAPE) {
+				_clear_selected();
+				return;
+			}
+		}
+
 		if (EditorSettings::get_singleton()->get("editors/3d/navigation/emulate_numpad")) {
 			const uint32_t code = k->get_scancode();
 			if (code >= KEY_0 && code <= KEY_9) {