2nd attempt to fix SPE-807

This commit is contained in:
Enrico Turri 2019-02-04 12:27:44 +01:00
parent f3efbe05b1
commit 5136ffa94b
3 changed files with 72 additions and 2 deletions

View file

@ -3030,6 +3030,7 @@ void Plater::on_config_change(const DynamicPrintConfig &config)
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
#if ENABLE_REWORKED_BED_SHAPE_CHANGE
bed_shape_changed = true;
std::cout << "changed bed shape" << std::endl;
#else
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
if (p->view3D) p->view3D->set_bed_shape(p->config->option<ConfigOptionPoints>(opt_key)->values);
@ -3065,6 +3066,7 @@ void Plater::on_config_change(const DynamicPrintConfig &config)
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
#if ENABLE_REWORKED_BED_SHAPE_CHANGE
bed_shape_changed = true;
std::cout << "changed printer model" << std::endl;
#else
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
if (p->view3D) p->view3D->set_bed_shape(p->config->option<ConfigOptionPoints>("bed_shape")->values);
@ -3088,6 +3090,7 @@ void Plater::on_config_change(const DynamicPrintConfig &config)
#if ENABLE_REWORKED_BED_SHAPE_CHANGE
if (bed_shape_changed)
{
std::cout << "calling bed shape updater on views" << std::endl;
if (p->view3D) p->view3D->set_bed_shape(p->config->option<ConfigOptionPoints>("bed_shape")->values);
if (p->preview) p->preview->set_bed_shape(p->config->option<ConfigOptionPoints>("bed_shape")->values);
}