浏览代码

Merge pull request #96571 from AThousandShips/fix_fave_crash

[Editor] Don't show popup when clicking empty in Favorites
Rémi Verschelde 1 年之前
父节点
当前提交
b6223c0df0
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      editor/filesystem_dock.cpp

+ 5 - 0
editor/filesystem_dock.cpp

@@ -3418,6 +3418,11 @@ void FileSystemDock::_file_list_empty_clicked(const Vector2 &p_pos, MouseButton
 
 	current_path = current_path_line_edit->get_text();
 
+	// Favorites isn't a directory so don't show menu.
+	if (current_path == "Favorites") {
+		return;
+	}
+
 	file_list_popup->clear();
 	file_list_popup->reset_size();