Skip to content

Commit

Permalink
Merge pull request godotengine#97185 from KoBeWi/ID_war
Browse files Browse the repository at this point in the history
Fix FileSystemDock's EditorContextMenuPlugins
  • Loading branch information
akien-mga committed Sep 19, 2024
2 parents d788205 + 5901a7a commit c8d76c1
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions editor/filesystem_dock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());

Expand All @@ -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;
}
Expand Down

0 comments on commit c8d76c1

Please sign in to comment.