Keep the IDEX/IQEX settings out of Simple mode

The Multimaterial page showed an IDEX/IQEX section in Simple mode on
every FFF printer. The pre-slice warnings row's hand-built option
definition left its mode at comSimple; it now uses comAdvanced, like the
IMEX options around it. The parallel modes grid had a group of its own
holding only a full-width widget line, which records no mode, so that
group showed in every mode. The grid now sits in the configuration
group, which follows its Advanced rows. That group shows or hides
everything in it, so the grid keeps itself hidden on non-IMEX printers
(IMEXModesCtrl::set_applicable).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Clifford Garwood
2026-10-09 01:22:04 -04:00
co-authored by Claude Opus 5.5
parent d4edf59301
commit 7c2566488a
2 changed files with 18 additions and 4 deletions
+12
View File
@@ -103,7 +103,19 @@ public:
// a load_from_config() that detaches the textbox the user is typing in.
bool matches_config(const DynamicPrintConfig& cfg) const;
// Whether the printer is an IMEX printer. The grid sits in an options group that shows or hides
// everything in it by mode, so Show() keeps it hidden on other printers whatever the group asks.
void set_applicable(bool applicable)
{
m_applicable = applicable;
if (!applicable)
wxPanel::Show(false); // showing is left to the group, which knows the mode
}
bool Show(bool show = true) override { return wxPanel::Show(show && m_applicable); }
private:
bool m_applicable = true;
// map<physical tool idx, role> for one `imex_mode_active_tools` entry. A tool absent
// from the map is Inactive — the same convention the serialized string uses, so the
// round trip needs no separate "off" value.
+6 -4
View File
@@ -5845,6 +5845,7 @@ if (is_marlin_flavor)
// activate_line to return early before build_field.
ConfigOptionDef placeholder_def;
placeholder_def.label = L("Pre-slice warnings");
placeholder_def.mode = comAdvanced;
placeholder_def.tooltip = L("Show a warning dialog before slicing if IDEX/IQEX parallel mode "
"concerns are detected (bed temperature conflicts, filament type "
"mismatches, multi-material conflicts). Can be suppressed from the "
@@ -5866,7 +5867,8 @@ if (is_marlin_flavor)
}
optgroup->append_single_option_line("imex_viz_theme");
{
auto modes_og = page->new_optgroup(L("IDEX/IQEX Parallel Modes"), L"param_advanced");
// In the configuration group rather than a group of its own: a full-width widget line
// records no mode, so a group holding only this line would show in every mode.
auto line = Line{ L("Modes"), L("") };
line.full_width = 1;
line.widget = [this](wxWindow* parent) -> wxSizer* {
@@ -5938,7 +5940,7 @@ if (is_marlin_flavor)
};
auto* sizer = new wxBoxSizer(wxHORIZONTAL);
// Align the left edge with the option-line labels above. A full-width line's
// widget is inset by 15 (OptionsGroup::append_line), while an ordinary line's
// widget is inset by 15 (OptionsGroup::activate_line), while an ordinary line's
// custom control is inset by 10 and then paints its label further in again, so
// the two do not line up without this. One number, tuned against the settings
// page. Unscaled on purpose: the 15 and 10 it compensates for are raw pixels too,
@@ -5946,7 +5948,7 @@ if (is_marlin_flavor)
sizer->Add(m_imex_modes_ctrl, 1, wxEXPAND | wxLEFT, 8);
return sizer;
};
modes_og->append_line(line);
optgroup->append_line(line);
}
m_pages.insert(m_pages.end() - n_after_single_extruder_MM, page);
@@ -6454,7 +6456,7 @@ void TabPrinter::toggle_options()
toggle_option("imex_tool_layout", is_imex);
toggle_option("imex_viz_theme", is_imex);
toggle_option("imex_firmware_managed_zones", is_imex);
if (m_imex_modes_ctrl) m_imex_modes_ctrl->Show(is_imex);
if (m_imex_modes_ctrl) m_imex_modes_ctrl->set_applicable(is_imex);
// IDEX/IQEX: the tool_layout dropdown carries 4 corner values
// (front-left / front-right / rear-left / rear-right) in storage, but front/rear