2.2.0 dev lxy 1218 (#73)

* Modification: Migrate login interface

* Change 'China' to 'Chinese Mainland'

* Add: wcp_networktestdialog

* Optimization: Main process freezing when connecting devices

* Add: wcp_gettimelapseinstance & wcp_defectdetactionconfig

* Change: network test level

* Optimization: U1 piece-by-piece printing alarm alert

* Optimization: Adjust the display order of brands for the selected models

* Fix: WebpresetDialog now loads presets synchronously to prevent crashes

* Add: wcp_sw_SubscribePageStateChange & wcp_sw_UnsubscribePageStateChange
This commit is contained in:
xiaoyeliu
2025-12-18 20:02:40 +08:00
committed by GitHub
parent e145435f6f
commit ece21860e7
11 changed files with 271 additions and 19 deletions

View File

@@ -49,6 +49,7 @@
#include "Search.hpp"
#include "BedShapeDialog.hpp"
#include "libslic3r/GCode/Thumbnails.hpp"
#include "NotificationManager.hpp"
#include "BedShapeDialog.hpp"
// #include "BonjourDialog.hpp"
@@ -1548,6 +1549,38 @@ void Tab::on_value_change(const std::string& opt_key, const boost::any& value)
}
}
// BBS: Add warning notification for Snapmaker U1 + Print by Object
if (opt_key == "print_sequence") {
PrintSequence print_seq = m_config->opt_enum<PrintSequence>("print_sequence");
if (print_seq == PrintSequence::ByObject) {
// Get current printer model
auto printer_model_opt = wxGetApp().preset_bundle->printers.get_edited_preset().config.option<ConfigOptionString>("printer_model");
if (printer_model_opt && !printer_model_opt->value.empty()) {
std::string printer_model = printer_model_opt->value;
// Check if this is Snapmaker U1 printer
bool is_snapmaker_u1 = boost::icontains(printer_model, "Snapmaker") &&
boost::icontains(printer_model, "U1");
if (is_snapmaker_u1) {
// Show red warning notification
if (wxGetApp().plater() && wxGetApp().plater()->get_notification_manager()) {
std::string warning_text = _u8L("Warning: Printing by object with caution. This function may cause the print head to collide with printed parts during switching.");
wxGetApp().plater()->get_notification_manager()->push_plater_error_notification(warning_text);
}
}
}
} else {
// Clear warning when switching away from ByObject
if (wxGetApp().plater() && wxGetApp().plater()->get_notification_manager()) {
std::string warning_text = _u8L("Warning: Printing by object with caution. This function may cause the print head to collide with printed parts during switching.");
wxGetApp().plater()->get_notification_manager()->close_plater_error_notification(warning_text);
}
}
}
// BBS set support style to default when support type changes
// Orca: do this only in simple mode
if (opt_key == "support_type" && m_mode == comSimple) {