Bugfix: object steps were not invalidated when First layer extrusion width was changed. #2379
This commit is contained in:
parent
0d3c4a160f
commit
e4dd5cf82f
2 changed files with 18 additions and 2 deletions
|
@ -173,6 +173,7 @@ bool
|
|||
Print::invalidate_state_by_config_options(const std::vector<t_config_option_key> &opt_keys)
|
||||
{
|
||||
std::set<PrintStep> steps;
|
||||
std::set<PrintObjectStep> osteps;
|
||||
|
||||
// this method only accepts PrintConfig option keys
|
||||
for (std::vector<t_config_option_key>::const_iterator opt_key = opt_keys.begin(); opt_key != opt_keys.end(); ++opt_key) {
|
||||
|
@ -223,6 +224,7 @@ Print::invalidate_state_by_config_options(const std::vector<t_config_option_key>
|
|||
|| *opt_key == "output_filename_format"
|
||||
|| *opt_key == "perimeter_acceleration"
|
||||
|| *opt_key == "post_process"
|
||||
|| *opt_key == "pressure_advance"
|
||||
|| *opt_key == "retract_before_travel"
|
||||
|| *opt_key == "retract_layer_change"
|
||||
|| *opt_key == "retract_length"
|
||||
|
@ -245,6 +247,12 @@ Print::invalidate_state_by_config_options(const std::vector<t_config_option_key>
|
|||
|| *opt_key == "wipe"
|
||||
|| *opt_key == "z_offset") {
|
||||
// these options only affect G-code export, so nothing to invalidate
|
||||
} else if (*opt_key == "first_layer_extrusion_width") {
|
||||
osteps.insert(posPerimeters);
|
||||
osteps.insert(posInfill);
|
||||
osteps.insert(posSupportMaterial);
|
||||
steps.insert(psSkirt);
|
||||
steps.insert(psBrim);
|
||||
} else {
|
||||
// for legacy, if we can't handle this option let's invalidate all steps
|
||||
return this->invalidate_all_steps();
|
||||
|
@ -255,6 +263,11 @@ Print::invalidate_state_by_config_options(const std::vector<t_config_option_key>
|
|||
for (std::set<PrintStep>::const_iterator step = steps.begin(); step != steps.end(); ++step) {
|
||||
if (this->invalidate_step(*step)) invalidated = true;
|
||||
}
|
||||
for (std::set<PrintObjectStep>::const_iterator ostep = osteps.begin(); ostep != osteps.end(); ++ostep) {
|
||||
FOREACH_OBJECT(this, object) {
|
||||
if ((*object)->invalidate_step(*ostep)) invalidated = true;
|
||||
}
|
||||
}
|
||||
|
||||
return invalidated;
|
||||
}
|
||||
|
|
|
@ -203,6 +203,7 @@ PrintObject::invalidate_state_by_config_options(const std::vector<t_config_optio
|
|||
|| *opt_key == "extra_perimeters"
|
||||
|| *opt_key == "gap_fill_speed"
|
||||
|| *opt_key == "overhangs"
|
||||
|| *opt_key == "first_layer_extrusion_width"
|
||||
|| *opt_key == "perimeter_extrusion_width"
|
||||
|| *opt_key == "thin_walls"
|
||||
|| *opt_key == "external_perimeters_first") {
|
||||
|
@ -224,7 +225,8 @@ PrintObject::invalidate_state_by_config_options(const std::vector<t_config_optio
|
|||
|| *opt_key == "support_material_pattern"
|
||||
|| *opt_key == "support_material_spacing"
|
||||
|| *opt_key == "support_material_threshold"
|
||||
|| *opt_key == "dont_support_bridges") {
|
||||
|| *opt_key == "dont_support_bridges"
|
||||
|| *opt_key == "first_layer_extrusion_width") {
|
||||
steps.insert(posSupportMaterial);
|
||||
} else if (*opt_key == "interface_shells"
|
||||
|| *opt_key == "infill_only_where_needed"
|
||||
|
@ -239,7 +241,8 @@ PrintObject::invalidate_state_by_config_options(const std::vector<t_config_optio
|
|||
|| *opt_key == "fill_pattern"
|
||||
|| *opt_key == "infill_every_layers"
|
||||
|| *opt_key == "solid_infill_every_layers"
|
||||
|| *opt_key == "top_infill_extrusion_width") {
|
||||
|| *opt_key == "top_infill_extrusion_width"
|
||||
|| *opt_key == "first_layer_extrusion_width") {
|
||||
steps.insert(posInfill);
|
||||
} else if (*opt_key == "fill_density"
|
||||
|| *opt_key == "solid_infill_extrusion_width") {
|
||||
|
|
Loading…
Add table
Reference in a new issue