Fix Input Map key assignments missing after project conversion
Fixes #76336 (Input Map keys missing).
Moves the project.godot config_version stamping from the project manager
to the project converter. Now there's no difference between converting through
the project manager and the CLI tool.
Fixes being prompted to re-convert the project in the project manager after
having done so through the CLI tool.
(cherry picked from commit 0985019c28)
This commit is contained in:
@ -439,6 +439,7 @@ bool ProjectConverter3To4::convert() {
|
||||
rename_common(RenamesMap3To4::builtin_types_renames, reg_container.builtin_types_regexes, source_lines);
|
||||
rename_input_map_scancode(source_lines, reg_container);
|
||||
rename_common(RenamesMap3To4::input_map_renames, reg_container.input_map_regexes, source_lines);
|
||||
custom_rename(source_lines, "config_version=4", "config_version=5");
|
||||
} else if (file_name.ends_with(".csproj")) {
|
||||
// TODO
|
||||
} else if (file_name.ends_with(".import")) {
|
||||
|
||||
@ -2356,14 +2356,6 @@ void ProjectManager::_perform_full_project_conversion() {
|
||||
const String &path = selected_list[0].path;
|
||||
|
||||
print_line("Converting project: " + path);
|
||||
|
||||
Ref<ConfigFile> cf;
|
||||
cf.instantiate();
|
||||
cf->load(path.path_join("project.godot"));
|
||||
cf->set_value("", "config_version", GODOT4_CONFIG_VERSION);
|
||||
cf->save(path.path_join("project.godot"));
|
||||
_project_list->set_project_version(path, GODOT4_CONFIG_VERSION);
|
||||
|
||||
List<String> args;
|
||||
args.push_back("--path");
|
||||
args.push_back(path);
|
||||
@ -2371,6 +2363,8 @@ void ProjectManager::_perform_full_project_conversion() {
|
||||
|
||||
Error err = OS::get_singleton()->create_instance(args);
|
||||
ERR_FAIL_COND(err);
|
||||
|
||||
_project_list->set_project_version(path, GODOT4_CONFIG_VERSION);
|
||||
}
|
||||
|
||||
void ProjectManager::_run_project_confirm() {
|
||||
|
||||
Reference in New Issue
Block a user