disable misleading 3mf version warning

(cherry picked from commit b4b98053834be05a79363a4c6f80d927192c982e)
This commit is contained in:
SoftFever 2023-12-02 01:27:09 +08:00
parent 643476084a
commit be91ae6ebe

View File

@ -3421,50 +3421,38 @@ std::vector<size_t> Plater::priv::load_files(const std::vector<fs::path>& input_
// Is there any modifier or advanced config data? // Is there any modifier or advanced config data?
for (ModelVolume *model_volume : model_object->volumes) model_volume->config.reset(); for (ModelVolume *model_volume : model_object->volumes) model_volume->config.reset();
} }
} else if (load_config && (file_version > app_version)) {
if (config_substitutions.unrecogized_keys.size() > 0) {
wxString text = wxString::Format(_L("This slicer file version %s is newer than %s's version:"),
file_version.to_string(), std::string(SLIC3R_APP_FULL_NAME));
text += "\n";
bool first = true;
// std::string context = into_u8(text);
wxString context = text;
if (wxGetApp().app_config->get("user_mode") == "develop") {
for (auto &key : config_substitutions.unrecogized_keys) {
context += " -";
context += key;
context += ";\n";
first = false;
} }
} // else if (load_config && (file_version > app_version)) {
wxString append = _L("Would you like to update your Bambu Studio software to enable all functionality in this slicer file?\n"); // if (config_substitutions.unrecogized_keys.size() > 0) {
context += "\n\n"; // wxString text = wxString::Format(_L("The 3mf's version %s is newer than %s's version %s, Found following keys unrecognized:"),
// context += into_u8(append); // file_version.to_string(), std::string(SLIC3R_APP_FULL_NAME), app_version.to_string());
context += append; // text += "\n";
MessageDialog msg_window(q, context, wxString(SLIC3R_APP_FULL_NAME " - ") + _L("Newer 3mf version"), wxYES | wxNO | wxICON_INFORMATION); // bool first = true;
auto res = msg_window.ShowModal(); // // std::string context = into_u8(text);
if (res == wxID_YES) { // wxString context = text;
wxGetApp().check_new_version(true, 1); // for (auto &key : config_substitutions.unrecogized_keys) {
} else if (res == wxID_NO) { // context += " -";
show_info(q, _L("you can always update Bambu Studio at your convenience. The slicer file will now be loaded without full functionality.")); // context += key;
} // context += ";\n";
} // first = false;
else { // }
//if the minor version is not matched // wxString append = _L("You'd better upgrade your software.\n");
if (file_version.min() != app_version.min()) { // context += "\n\n";
wxString text = wxString::Format(_L("This slicer file version %s is newer than %s's version.\n\nWould you like to update your Bambu Studio software to enable all functionality in this slicer file?"), // // context += into_u8(append);
file_version.to_string(), std::string(SLIC3R_APP_FULL_NAME)); // context += append;
text += "\n"; // show_info(q, context, _L("Newer 3mf version"));
MessageDialog msg_window(q, text, wxString(SLIC3R_APP_FULL_NAME " - ") + _L("Newer 3mf version"), wxYES | wxNO | wxICON_INFORMATION); // }
auto res = msg_window.ShowModal(); // else {
if (res == wxID_YES) { // //if the minor version is not matched
wxGetApp().check_new_version(true, 1); // if (file_version.min() != app_version.min()) {
} else if (res == wxID_NO) { // wxString text = wxString::Format(_L("The 3mf's version %s is newer than %s's version %s, Suggest to upgrade your software."),
show_info(q, _L("you can always update Bambu Studio at your convenience. The slicer file will now be loaded without full functionality.")); // file_version.to_string(), std::string(SLIC3R_APP_FULL_NAME), app_version.to_string());
} // text += "\n";
} // show_info(q, text, _L("Newer 3mf version"));
} // }
} else if (!load_config) { // }
// }
else if (!load_config) {
// reset config except color // reset config except color
for (ModelObject *model_object : model.objects) { for (ModelObject *model_object : model.objects) {
bool has_extruder = model_object->config.has("extruder"); bool has_extruder = model_object->config.has("extruder");