Synchronize SLA background processing on UI change, so that

the supports disappear if invalidated.
This commit is contained in:
bubnikv 2018-11-22 12:42:17 +01:00
parent cac56154ef
commit 94b1183843

View file

@ -1771,9 +1771,7 @@ unsigned int Plater::priv::update_background_process()
} }
break; break;
case ptSLA: case ptSLA:
//FIXME as of now the Print::APPLY_STATUS_INVALIDATED is not reliable, and return_state |= UPDATE_BACKGROUND_PROCESS_REFRESH_SCENE;
// currently the scene refresh is expensive and loses selection.
//return_state |= UPDATE_BACKGROUND_PROCESS_REFRESH_SCENE;
break; break;
} }
} }
@ -1984,13 +1982,8 @@ void Plater::priv::on_process_completed(wxCommandEvent &evt)
case ptSLA: case ptSLA:
// Update the SLAPrint from the current Model, so that the reload_scene() // Update the SLAPrint from the current Model, so that the reload_scene()
// pulls the correct data. // pulls the correct data.
if (this->update_background_process() & UPDATE_BACKGROUND_PROCESS_RESTART)
// FIXME: SLAPrint::apply is not ready for this. At this stage it would this->schedule_background_process();
// invalidate the previous result and the supports would not be available
// for rendering.
// if (this->update_background_process() & UPDATE_BACKGROUND_PROCESS_RESTART)
// this->schedule_background_process();
_3DScene::reload_scene(canvas3D, true); _3DScene::reload_scene(canvas3D, true);
break; break;
} }