This commit is contained in:
SoftFever
2026-01-27 00:42:23 +08:00
parent 997b2154c8
commit 722d5f8aa7
8 changed files with 182 additions and 325 deletions

View File

@@ -3208,7 +3208,9 @@ std::map<int, DynamicPrintConfig> Sidebar::build_filament_ams_list(MachineObject
// For pull-mode agents (e.g., HTTP REST API), refresh DevFilaSystem first
auto* agent = wxGetApp().getDeviceManager()->get_agent();
if (agent && agent->get_filament_sync_mode() == FilamentSyncMode::pull) {
agent->fetch_filament_info(obj->get_dev_id());
if (!agent->fetch_filament_info(obj->get_dev_id())) {
return filament_ams_list;
}
}
auto build_tray_config = [](DevAmsTray const &tray, std::string const &name, std::string ams_id, std::string slot_id) {
@@ -16631,8 +16633,15 @@ void Plater::pop_warning_and_go_to_device_page(wxString printer_name, PrinterWar
{
printer_name.Replace("Bambu Lab", "", false);
wxString content;
bool device_page = (wxGetApp().mainframe == nullptr) && (wxGetApp().mainframe->m_monitor->IsShown());
if (type == PrinterWarningType::NOT_CONNECTED) {
content = wxString::Format(_L("Printer not connected. Please go to the device page to connect %s before syncing."), printer_name);
if (device_page) {
content = wxString::Format(_L("Printer not connected. Please go to the device page to connect %s before syncing."),
printer_name);
} else {
content = wxString::Format(
_L("OrcaSlicer can't connect to %s. Please check if the printer is powered on and connected to the network."), printer_name);
}
} else if (type == PrinterWarningType::INCONSISTENT) {
content = wxString::Format(_L("The currently connected printer on the device page is not %s. Please switch to %s before syncing."), printer_name, printer_name);
} else if (type == PrinterWarningType::UNINSTALL_FILAMENT) {