badge support

This commit is contained in:
SoftFever
2026-01-31 01:04:21 +08:00
parent 7059789578
commit 8d22fad30b
14 changed files with 134 additions and 208 deletions

View File

@@ -2136,22 +2136,7 @@ void Tab::on_presets_changed()
void Tab::update_printer_agent_if_needed()
{
std::string agent_id = "orca";
if (m_preset_bundle) {
if (wxGetApp().preset_bundle->is_bbl_vendor()) {
agent_id = "bbl";
} else if (wxGetApp().preset_bundle->is_qidi_vendor()) {
agent_id = "qidi";
}
}
const DynamicPrintConfig& config = m_preset_bundle->printers.get_edited_preset().config;
if (config.has("printer_agent")) {
std::string value = config.option<ConfigOptionString>("printer_agent")->value;
if (!value.empty()) {
agent_id = value;
}
}
// Switch agent in GUI_App
wxGetApp().switch_printer_agent(agent_id);
}