mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-02 17:10:37 +08:00
Fix of sla forward compability
This commit is contained in:
parent
c47d761d6c
commit
68d285b6e1
@ -978,7 +978,6 @@ void GUI_App::legacy_app_config_vendor_check()
|
|||||||
if (!found_legacy_printers) {
|
if (!found_legacy_printers) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
bool found_prusa_sla_vendor = vendor_map.find("PrusaResearchSLA") != vendor_map.end();
|
|
||||||
// make a deep copy of vendor map with moved printers
|
// make a deep copy of vendor map with moved printers
|
||||||
std::map<std::string, std::map<std::string, std::set<std::string>>> new_vendor_map;
|
std::map<std::string, std::map<std::string, std::set<std::string>>> new_vendor_map;
|
||||||
for (const auto& vendor : vendor_map) {
|
for (const auto& vendor : vendor_map) {
|
||||||
@ -996,16 +995,12 @@ void GUI_App::legacy_app_config_vendor_check()
|
|||||||
}
|
}
|
||||||
app_config->set_vendors(new_vendor_map);
|
app_config->set_vendors(new_vendor_map);
|
||||||
|
|
||||||
if (found_prusa_sla_vendor) {
|
|
||||||
// The vendor was present in appconfig, we do nothing with its ini file.
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// copy PrusaResearchSLA ini file to vendors
|
// copy PrusaResearchSLA ini file to vendors
|
||||||
|
boost::system::error_code ec;
|
||||||
const boost::filesystem::path prusa_sla_in_resources = boost::filesystem::path(Slic3r::resources_dir()) / "profiles" / "PrusaResearchSLA.ini";
|
const boost::filesystem::path prusa_sla_in_resources = boost::filesystem::path(Slic3r::resources_dir()) / "profiles" / "PrusaResearchSLA.ini";
|
||||||
assert(boost::filesystem::exists(prusa_sla_in_resources));
|
assert(boost::filesystem::exists(prusa_sla_in_resources));
|
||||||
const boost::filesystem::path prusa_sla_in_vendors = boost::filesystem::path(Slic3r::data_dir()) / "vendor" / "PrusaResearchSLA.ini";
|
const boost::filesystem::path prusa_sla_in_vendors = boost::filesystem::path(Slic3r::data_dir()) / "vendor" / "PrusaResearchSLA.ini";
|
||||||
if (boost::filesystem::exists(prusa_sla_in_vendors)) {
|
if (boost::filesystem::exists(prusa_sla_in_vendors, ec)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
std::string message;
|
std::string message;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user