Merge remote-tracking branch 'origin/master' into ys_bug_fixing

This commit is contained in:
YuSanka 2019-04-16 15:27:10 +02:00
commit 850eb86360
41 changed files with 363 additions and 150 deletions

View file

@ -1633,6 +1633,14 @@ std::vector<size_t> Plater::priv::load_files(const std::vector<fs::path>& input_
break;
}
// is there any advanced config data ?
auto opt_keys = model_object->config.keys();
if (!opt_keys.empty() && !((opt_keys.size() == 1) && (opt_keys[0] == "extruder")))
{
advanced = true;
break;
}
// is there any modifier ?
for (const ModelVolume* model_volume : model_object->volumes)
{
@ -1641,6 +1649,14 @@ std::vector<size_t> Plater::priv::load_files(const std::vector<fs::path>& input_
advanced = true;
break;
}
// is there any advanced config data ?
opt_keys = model_volume->config.keys();
if (!opt_keys.empty() && !((opt_keys.size() == 1) && (opt_keys[0] == "extruder")))
{
advanced = true;
break;
}
}
if (advanced)
@ -3698,6 +3714,36 @@ void Plater::changed_object(int obj_idx)
this->p->schedule_background_process();
}
void Plater::changed_objects(const std::vector<size_t>& object_idxs)
{
if (object_idxs.empty())
return;
auto list = wxGetApp().obj_list();
wxASSERT(list != nullptr);
if (list == nullptr)
return;
if (list->is_parts_changed()) {
for (int obj_idx : object_idxs)
{
if (obj_idx < p->model.objects.size())
// recenter and re - align to Z = 0
p->model.objects[obj_idx]->ensure_on_bed();
}
if (this->p->printer_technology == ptSLA) {
// Update the SLAPrint from the current Model, so that the reload_scene()
// pulls the correct data, update the 3D scene.
this->p->update_restart_background_process(true, false);
}
else
p->view3D->reload_scene(false);
}
// update print
this->p->schedule_background_process();
}
void Plater::schedule_background_process()
{
this->p->schedule_background_process();