sublayers and more

This commit is contained in:
Ian Bassi
2026-08-12 18:24:32 -03:00
committed by SoftFever
parent 76f23396ea
commit ccd34ab03a
11 changed files with 355 additions and 7 deletions

View File

@@ -2575,6 +2575,10 @@ void SyncAmsInfoDialog::reset_and_sync_ams_list()
m_materialList.clear();
m_filaments.clear();
// Mixed-color slots are virtual: they never occupy a tray, so they must not appear as
// AMS sync targets. Look the flags up once and skip those slots in the loop below.
auto* is_mixed_opt = preset_bundle->project_config.option<ConfigOptionBools>("filament_is_mixed");
bool use_double_extruder = get_is_double_extruder();
if (use_double_extruder) {
const auto &project_config = preset_bundle->project_config;
@@ -2592,6 +2596,8 @@ void SyncAmsInfoDialog::reset_and_sync_ams_list()
auto colour_rgb = wxColour((int) rgb[0], (int) rgb[1], (int) rgb[2], (int) rgb[3]);
if (extruder >= materials.size() || extruder < 0 || extruder >= display_materials.size())
continue;
if (is_mixed_opt && extruder < (int) is_mixed_opt->values.size() && is_mixed_opt->values[extruder])
continue;
if (contronal_index % SYNC_FLEX_GRID_COL == 0) {
wxBoxSizer *ams_tip_sizer = new wxBoxSizer(wxVERTICAL);
@@ -2793,6 +2799,10 @@ void SyncAmsInfoDialog::generate_override_fix_ams_list()
m_fix_materialList.clear();
m_fix_filaments.clear();
// Mixed-color slots are virtual: they never occupy a tray, so they must not appear as
// AMS sync targets. Look the flags up once and skip those slots in the loop below.
auto* is_mixed_opt = preset_bundle->project_config.option<ConfigOptionBools>("filament_is_mixed");
bool use_double_extruder = get_is_double_extruder();
if (use_double_extruder) {
const auto &project_config = preset_bundle->project_config;
@@ -2810,6 +2820,8 @@ void SyncAmsInfoDialog::generate_override_fix_ams_list()
auto colour_rgb = wxColour((int) rgb[0], (int) rgb[1], (int) rgb[2], (int) rgb[3]);
if (extruder >= extruders.size() || extruder < 0 || extruder >= m_ams_combo_info.ams_filament_colors.size())
continue;
if (is_mixed_opt && extruder < (int) is_mixed_opt->values.size() && is_mixed_opt->values[extruder])
continue;
if (contronal_index % SYNC_FLEX_GRID_COL == 0) {
wxBoxSizer *ams_tip_sizer = new wxBoxSizer(wxVERTICAL);