Fix FileSystemDock's EditorContextMenuPlugins
This commit is contained in:
parent
694d3c2930
commit
5901a7a3d1
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue