mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-23 21:25:13 +00:00
fix badge mark
This commit is contained in:
@@ -1985,6 +1985,8 @@ Sidebar::Sidebar(Plater *parent)
|
|||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
|
// Orca: Sidebar - Filament titlebar UI
|
||||||
// add filament title
|
// add filament title
|
||||||
p->m_panel_filament_title = new StaticBox(p->scrolled, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL | wxBORDER_NONE);
|
p->m_panel_filament_title = new StaticBox(p->scrolled, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL | wxBORDER_NONE);
|
||||||
p->m_panel_filament_title->SetBackgroundColor(title_bg);
|
p->m_panel_filament_title->SetBackgroundColor(title_bg);
|
||||||
@@ -2094,7 +2096,8 @@ Sidebar::Sidebar(Plater *parent)
|
|||||||
//wxBoxSizer* bSizer_filament_content;
|
//wxBoxSizer* bSizer_filament_content;
|
||||||
//bSizer_filament_content = new wxBoxSizer( wxHORIZONTAL );
|
//bSizer_filament_content = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
|
||||||
// BBS: filament double columns
|
// Orca: Sidebar - Filament content UI: setup filament selection combos panel layout
|
||||||
|
// Creates a two-column grid layout for filament selection dropdowns within the scrollable panel
|
||||||
p->sizer_filaments = new wxBoxSizer(wxHORIZONTAL);
|
p->sizer_filaments = new wxBoxSizer(wxHORIZONTAL);
|
||||||
p->sizer_filaments->Add(new wxBoxSizer(wxVERTICAL), 1, wxEXPAND);
|
p->sizer_filaments->Add(new wxBoxSizer(wxVERTICAL), 1, wxEXPAND);
|
||||||
p->sizer_filaments->Add(new wxBoxSizer(wxVERTICAL), 1, wxEXPAND);
|
p->sizer_filaments->Add(new wxBoxSizer(wxVERTICAL), 1, wxEXPAND);
|
||||||
@@ -3501,6 +3504,14 @@ void Sidebar::sync_ams_list(bool is_from_big_sync_btn)
|
|||||||
auto_calc_flushing_volumes(i);
|
auto_calc_flushing_volumes(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Layout();
|
||||||
|
|
||||||
|
// Perform preset selection and list update first — these may rebuild combo widgets,
|
||||||
|
// which clears any badge state. Badges must be set AFTER these calls to persist.
|
||||||
|
wxGetApp().get_tab(Preset::TYPE_FILAMENT)->select_preset(wxGetApp().preset_bundle->filament_presets[0]);
|
||||||
|
wxGetApp().preset_bundle->export_selections(*wxGetApp().app_config);
|
||||||
|
update_dynamic_filament_list();
|
||||||
|
|
||||||
auto badge_combox_filament = [](PlaterPresetComboBox *c) {
|
auto badge_combox_filament = [](PlaterPresetComboBox *c) {
|
||||||
auto tip = _L("Filament type and color information have been synchronized, but slot information is not included.");
|
auto tip = _L("Filament type and color information have been synchronized, but slot information is not included.");
|
||||||
c->SetToolTip(tip);
|
c->SetToolTip(tip);
|
||||||
@@ -3567,11 +3578,6 @@ void Sidebar::sync_ams_list(bool is_from_big_sync_btn)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Layout();
|
|
||||||
|
|
||||||
wxGetApp().get_tab(Preset::TYPE_FILAMENT)->select_preset(wxGetApp().preset_bundle->filament_presets[0]);
|
|
||||||
wxGetApp().preset_bundle->export_selections(*wxGetApp().app_config);
|
|
||||||
update_dynamic_filament_list();
|
|
||||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << "begin pop_finsish_sync_ams_dialog";
|
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << "begin pop_finsish_sync_ams_dialog";
|
||||||
pop_finsish_sync_ams_dialog();
|
pop_finsish_sync_ams_dialog();
|
||||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << "finish pop_finsish_sync_ams_dialog";
|
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << "finish pop_finsish_sync_ams_dialog";
|
||||||
|
|||||||
@@ -580,6 +580,10 @@ void MoonrakerPrinterAgent::build_ams_payload(int ams_count, const std::vector<A
|
|||||||
DevFilaSystemParser::ParseV1_0(print_json, obj, obj->GetFilaSystem(), false);
|
DevFilaSystemParser::ParseV1_0(print_json, obj, obj->GetFilaSystem(), false);
|
||||||
BOOST_LOG_TRIVIAL(info) << "MoonrakerPrinterAgent::build_ams_payload: Parsed " << trays.size() << " trays";
|
BOOST_LOG_TRIVIAL(info) << "MoonrakerPrinterAgent::build_ams_payload: Parsed " << trays.size() << " trays";
|
||||||
|
|
||||||
|
// Set printer_type so update_sync_status() can match it against the preset's printer type.
|
||||||
|
// Without this, the comparison fails and all sync badges are cleared.
|
||||||
|
obj->printer_type = device_info.model_id;
|
||||||
|
|
||||||
// Set push counters so is_info_ready() returns true for pull-mode agents.
|
// Set push counters so is_info_ready() returns true for pull-mode agents.
|
||||||
if (obj->m_push_count == 0) {
|
if (obj->m_push_count == 0) {
|
||||||
obj->m_push_count = 1;
|
obj->m_push_count = 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user