mirror of
https://github.com/godotengine/godot.git
synced 2025-01-23 11:03:13 -05:00
Fix rightclick on some files changes the 'New' menu entry to 'Show in File Manager' due to no fixed index for the 'New' menu
This commit is contained in:
parent
0a9e6e478e
commit
6b59c57f2a
2 changed files with 7 additions and 6 deletions
|
@ -2636,7 +2636,7 @@ void FileSystemDock::_file_and_folders_fill_popup(PopupMenu *p_popup, Vector<Str
|
||||||
new_menu->connect("id_pressed", callable_mp(this, &FileSystemDock::_tree_rmb_option));
|
new_menu->connect("id_pressed", callable_mp(this, &FileSystemDock::_tree_rmb_option));
|
||||||
|
|
||||||
p_popup->add_child(new_menu);
|
p_popup->add_child(new_menu);
|
||||||
p_popup->add_submenu_item(TTR("New"), "New");
|
p_popup->add_submenu_item(TTR("New"), "New", FILE_NEW);
|
||||||
|
|
||||||
new_menu->add_icon_item(get_theme_icon(SNAME("Folder"), SNAME("EditorIcons")), TTR("Folder..."), FILE_NEW_FOLDER);
|
new_menu->add_icon_item(get_theme_icon(SNAME("Folder"), SNAME("EditorIcons")), TTR("Folder..."), FILE_NEW_FOLDER);
|
||||||
new_menu->add_icon_item(get_theme_icon(SNAME("PackedScene"), SNAME("EditorIcons")), TTR("Scene..."), FILE_NEW_SCENE);
|
new_menu->add_icon_item(get_theme_icon(SNAME("PackedScene"), SNAME("EditorIcons")), TTR("Scene..."), FILE_NEW_SCENE);
|
||||||
|
|
|
@ -90,17 +90,18 @@ private:
|
||||||
FILE_DUPLICATE,
|
FILE_DUPLICATE,
|
||||||
FILE_REIMPORT,
|
FILE_REIMPORT,
|
||||||
FILE_INFO,
|
FILE_INFO,
|
||||||
FILE_NEW_FOLDER,
|
FILE_NEW,
|
||||||
FILE_NEW_SCRIPT,
|
|
||||||
FILE_NEW_SCENE,
|
|
||||||
FILE_SHOW_IN_EXPLORER,
|
FILE_SHOW_IN_EXPLORER,
|
||||||
FILE_OPEN_EXTERNAL,
|
FILE_OPEN_EXTERNAL,
|
||||||
FILE_COPY_PATH,
|
FILE_COPY_PATH,
|
||||||
FILE_COPY_UID,
|
FILE_COPY_UID,
|
||||||
FILE_NEW_RESOURCE,
|
|
||||||
FILE_NEW_TEXTFILE,
|
|
||||||
FOLDER_EXPAND_ALL,
|
FOLDER_EXPAND_ALL,
|
||||||
FOLDER_COLLAPSE_ALL,
|
FOLDER_COLLAPSE_ALL,
|
||||||
|
FILE_NEW_RESOURCE,
|
||||||
|
FILE_NEW_TEXTFILE,
|
||||||
|
FILE_NEW_FOLDER,
|
||||||
|
FILE_NEW_SCRIPT,
|
||||||
|
FILE_NEW_SCENE,
|
||||||
};
|
};
|
||||||
|
|
||||||
FileSortOption file_sort = FILE_SORT_NAME;
|
FileSortOption file_sort = FILE_SORT_NAME;
|
||||||
|
|
Loading…
Add table
Reference in a new issue