summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkobewi <kobewi4e@gmail.com>2024-09-19 15:33:05 +0200
committerkobewi <kobewi4e@gmail.com>2024-09-19 15:33:11 +0200
commit5901a7a3d13c29480cc61a9706cf456211af049a (patch)
tree6d6eff375c40fbf0f127c16ee5d1ad3ee2404bb0
parent694d3c2930bdfb43fd93e1e6641f66c4f19a5c77 (diff)
downloadredot-engine-5901a7a3d13c29480cc61a9706cf456211af049a.tar.gz
Fix FileSystemDock's EditorContextMenuPlugins
-rw-r--r--editor/filesystem_dock.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp
index 1082e4d0c2..368134f32e 100644
--- a/editor/filesystem_dock.cpp
+++ b/editor/filesystem_dock.cpp
@@ -2678,8 +2678,11 @@ void FileSystemDock::_file_option(int p_option, const Vector<String> &p_selected
} break;
default: {
- // Resource conversion commands:
- if (p_option >= CONVERT_BASE_ID) {
+ if (p_option >= EditorContextMenuPlugin::BASE_ID) {
+ if (!EditorContextMenuPluginManager::get_singleton()->activate_custom_option(EditorContextMenuPlugin::CONTEXT_SLOT_FILESYSTEM, p_option, p_selected)) {
+ EditorContextMenuPluginManager::get_singleton()->activate_custom_option(EditorContextMenuPlugin::CONTEXT_SLOT_FILESYSTEM_CREATE, p_option, p_selected);
+ }
+ } else if (p_option >= CONVERT_BASE_ID) {
selected_conversion_id = p_option - CONVERT_BASE_ID;
ERR_FAIL_INDEX(selected_conversion_id, (int)cached_valid_conversion_targets.size());
@@ -2697,10 +2700,6 @@ void FileSystemDock::_file_option(int p_option, const Vector<String> &p_selected
}
conversion_id++;
}
- } else {
- if (!EditorContextMenuPluginManager::get_singleton()->activate_custom_option(EditorContextMenuPlugin::CONTEXT_SLOT_FILESYSTEM, p_option, p_selected)) {
- EditorContextMenuPluginManager::get_singleton()->activate_custom_option(EditorContextMenuPlugin::CONTEXT_SLOT_FILESYSTEM_CREATE, p_option, p_selected);
- }
}
break;
}