mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-17 02:22:17 +00:00
ENH:supports new fields for flag3
jira:[none] Change-Id: I013c7b843f3f7d5156a8d209572da2bc078e9191 (cherry picked from commit 106d9865c3e569b95519ae9bd9193d10bd991d1a)
This commit is contained in:
@@ -1465,19 +1465,17 @@ bool AMSControl::Enable(bool enable)
|
||||
return wxWindow::Enable(enable);
|
||||
}
|
||||
|
||||
void AMSControl::SetExtruder(bool on_off, std::string ams_id, std::string slot_id)
|
||||
void AMSControl::SetExtruder(bool on_off, int nozzle_id, std::string ams_id, std::string slot_id)
|
||||
{
|
||||
AmsItem *item = nullptr;
|
||||
if (m_ams_item_list.find(ams_id) != m_ams_item_list.end()) { item = m_ams_item_list[ams_id]; }
|
||||
|
||||
if (!item) {
|
||||
return;
|
||||
}
|
||||
if (!on_off) {
|
||||
m_extruder->OnAmsLoading(false, item->get_nozzle_id());
|
||||
} else {
|
||||
if (on_off && item) {
|
||||
auto col = item->GetTagColr(slot_id);
|
||||
m_extruder->OnAmsLoading(true, item->get_nozzle_id(), col);
|
||||
m_extruder->OnAmsLoading(true, nozzle_id, col);
|
||||
}
|
||||
else {
|
||||
m_extruder->OnAmsLoading(false, nozzle_id);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user