diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2024-09-19 17:13:53 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-09-19 17:13:53 +0200 |
commit | c8d76c1edd53cb835fa172b7aad061ea87e345b6 (patch) | |
tree | 80c70bd64bd29db9e663756dfaf87368ac1a0f09 | |
parent | d788205826d23f5afb0cd8fea17069784b68bc2e (diff) | |
parent | 5901a7a3d13c29480cc61a9706cf456211af049a (diff) | |
download | redot-engine-c8d76c1edd53cb835fa172b7aad061ea87e345b6.tar.gz |
Merge pull request #97185 from KoBeWi/ID_war
Fix FileSystemDock's EditorContextMenuPlugins
-rw-r--r-- | editor/filesystem_dock.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp index a5c8fa3d6b..dd2eec6893 100644 --- a/editor/filesystem_dock.cpp +++ b/editor/filesystem_dock.cpp @@ -2662,8 +2662,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()); @@ -2681,10 +2684,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; } |