For consistency, move prerequisites after the state guard

This commit is contained in:
Alessandro Ranellucci 2018-11-26 23:50:44 +01:00
parent c0465d0434
commit 75670c6819

View File

@ -335,12 +335,12 @@ PrintObject::has_support_material() const
void void
PrintObject::detect_surfaces_type() PrintObject::detect_surfaces_type()
{ {
// prerequisites
this->slice();
if (this->state.is_done(posDetectSurfaces)) return; if (this->state.is_done(posDetectSurfaces)) return;
this->state.set_started(posDetectSurfaces); this->state.set_started(posDetectSurfaces);
// prerequisites
this->slice();
parallelize<Layer*>( parallelize<Layer*>(
std::queue<Layer*>(std::deque<Layer*>(this->layers.begin(), this->layers.end())), // cast LayerPtrs to std::queue<Layer*> std::queue<Layer*>(std::deque<Layer*>(this->layers.begin(), this->layers.end())), // cast LayerPtrs to std::queue<Layer*>
boost::bind(&Slic3r::Layer::detect_surfaces_type, _1), boost::bind(&Slic3r::Layer::detect_surfaces_type, _1),
@ -1187,12 +1187,12 @@ PrintObject::make_perimeters()
void void
PrintObject::infill() PrintObject::infill()
{ {
// prerequisites
this->prepare_infill();
if (this->state.is_done(posInfill)) return; if (this->state.is_done(posInfill)) return;
this->state.set_started(posInfill); this->state.set_started(posInfill);
// prerequisites
this->prepare_infill();
parallelize<Layer*>( parallelize<Layer*>(
std::queue<Layer*>(std::deque<Layer*>(this->layers.begin(), this->layers.end())), // cast LayerPtrs to std::queue<Layer*> std::queue<Layer*>(std::deque<Layer*>(this->layers.begin(), this->layers.end())), // cast LayerPtrs to std::queue<Layer*>
boost::bind(&Slic3r::Layer::make_fills, _1), boost::bind(&Slic3r::Layer::make_fills, _1),