Auto hide/show the ironing angle settings if the selected ironing pattern does not use the user specified angles (#11451)

Co-authored-by: yw4z <ywsyildiz@gmail.com>
Co-authored-by: Ian Bassi <ian.bassi@outlook.com>
This commit is contained in:
Anson Liu
2026-04-09 15:23:09 -07:00
committed by GitHub
parent 984178ac29
commit 2033e60052

View File

@@ -793,6 +793,9 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig *config, co
bool has_ironing = (config->opt_enum<IroningType>("ironing_type") != IroningType::NoIroning);
for (auto el : { "ironing_pattern", "ironing_flow", "ironing_spacing", "ironing_angle", "ironing_inset", "ironing_angle_fixed" })
toggle_line(el, has_ironing);
bool has_rectilinear_ironing = (config->opt_enum<InfillPattern>("ironing_pattern") == InfillPattern::ipRectilinear);
for (auto el : {"ironing_angle", "ironing_angle_fixed"})
toggle_field(el, has_ironing && has_rectilinear_ironing);
toggle_line("ironing_speed", has_ironing || has_support_ironing);