Fixed some background processing synchronization issues.

This commit is contained in:
bubnikv 2018-11-23 17:05:44 +01:00
parent aaab549cfa
commit 103af1d8fb
2 changed files with 6 additions and 3 deletions

View file

@ -130,8 +130,10 @@ SLAPrint::ApplyStatus SLAPrint::apply(const Model &model,
tbb::mutex::scoped_lock lock(this->state_mutex());
// The following call may stop the background processing.
update_apply_status(this->invalidate_state_by_config_options(printer_diff));
update_apply_status(this->invalidate_state_by_config_options(material_diff));
if (! printer_diff.empty())
update_apply_status(this->invalidate_state_by_config_options(printer_diff));
if (! material_diff.empty())
update_apply_status(this->invalidate_state_by_config_options(material_diff));
// It is also safe to change m_config now after this->invalidate_state_by_config_options() call.
m_printer_config.apply_only(config, printer_diff, true);