mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-17 02:22:17 +00:00
FIX: modify for virtual slot when multi_extruder
jira: none Change-Id: Ic7284018ecb44e24536788b05dba572b96460e66 (cherry picked from commit 52e890fba1584bf9687a24ee46890c00f531e383)
This commit is contained in:
@@ -740,12 +740,20 @@ void CalibrationPresetPage::create_filament_list_panel(wxWindow* parent)
|
||||
|
||||
NozzleVolumeType CalibrationPresetPage::get_nozzle_volume_type(int extruder_id) const
|
||||
{
|
||||
return NozzleVolumeType(m_comboBox_nozzle_volume_types[extruder_id]->GetSelection());
|
||||
if (m_comboBox_nozzle_volume_types.size() > extruder_id)
|
||||
return NozzleVolumeType(m_comboBox_nozzle_volume_types[extruder_id]->GetSelection());
|
||||
else {
|
||||
return NozzleVolumeType::nvtNormal;
|
||||
}
|
||||
}
|
||||
|
||||
ExtruderType CalibrationPresetPage::get_extruder_type(int extruder_id) const
|
||||
{
|
||||
return ExtruderType(m_extrder_types[extruder_id]);
|
||||
if (m_extrder_types.size() > extruder_id)
|
||||
return ExtruderType(m_extrder_types[extruder_id]);
|
||||
else {
|
||||
return ExtruderType::etDirectDrive;
|
||||
}
|
||||
}
|
||||
|
||||
void CalibrationPresetPage::create_multi_extruder_filament_list_panel(wxWindow *parent)
|
||||
@@ -2289,14 +2297,14 @@ void CalibrationPresetPage::update_filament_combobox(std::string ams_id)
|
||||
// update virtual tray combo box
|
||||
m_virtual_tray_comboBox->update_from_preset();
|
||||
auto it = std::find_if(filament_ams_list.begin(), filament_ams_list.end(), [](auto& entry) {
|
||||
return entry.first == VIRTUAL_TRAY_DEPUTY_ID;
|
||||
return entry.first == VIRTUAL_TRAY_MAIN_ID;
|
||||
});
|
||||
|
||||
if (it != filament_ams_list.end()) {
|
||||
m_virtual_tray_comboBox->load_tray_from_ams(VIRTUAL_TRAY_DEPUTY_ID, it->second);
|
||||
m_virtual_tray_comboBox->load_tray_from_ams(VIRTUAL_TRAY_MAIN_ID, it->second);
|
||||
}
|
||||
else {
|
||||
m_virtual_tray_comboBox->load_tray_from_ams(VIRTUAL_TRAY_DEPUTY_ID, empty_config);
|
||||
m_virtual_tray_comboBox->load_tray_from_ams(VIRTUAL_TRAY_MAIN_ID, empty_config);
|
||||
}
|
||||
|
||||
if (filament_ams_list.empty())
|
||||
|
||||
Reference in New Issue
Block a user