Mega Region Update.
This commit is contained in:
+8
-5
@@ -99,7 +99,7 @@ namespace anm2ed
|
||||
|
||||
void Manager::new_(const std::filesystem::path& path) { open(path, true); }
|
||||
|
||||
void Manager::save(int index, const std::filesystem::path& path)
|
||||
void Manager::save(int index, const std::filesystem::path& path, anm2::Compatibility compatibility)
|
||||
{
|
||||
if (auto document = get(index); document)
|
||||
{
|
||||
@@ -107,18 +107,21 @@ namespace anm2ed
|
||||
ensure_parent_directory_exists(path);
|
||||
document->path = !path.empty() ? path : document->path;
|
||||
document->path.replace_extension(".anm2");
|
||||
document->save(document->path, &errorString);
|
||||
document->save(document->path, &errorString, compatibility);
|
||||
recent_file_add(document->path);
|
||||
}
|
||||
}
|
||||
|
||||
void Manager::save(const std::filesystem::path& path) { save(selected, path); }
|
||||
void Manager::save(const std::filesystem::path& path, anm2::Compatibility compatibility)
|
||||
{
|
||||
save(selected, path, compatibility);
|
||||
}
|
||||
|
||||
void Manager::autosave(Document& document)
|
||||
void Manager::autosave(Document& document, anm2::Compatibility compatibility)
|
||||
{
|
||||
std::string errorString{};
|
||||
auto autosavePath = document.autosave_path_get();
|
||||
if (!document.autosave(&errorString)) return;
|
||||
if (!document.autosave(&errorString, compatibility)) return;
|
||||
|
||||
autosaveFiles.erase(std::remove(autosaveFiles.begin(), autosaveFiles.end(), autosavePath), autosaveFiles.end());
|
||||
autosaveFiles.insert(autosaveFiles.begin(), autosavePath);
|
||||
|
||||
Reference in New Issue
Block a user