Hiding the sla support structures after undo/redo

This commit is contained in:
Lukas Matena 2019-07-25 11:23:23 +02:00
parent dda7b3fc52
commit fe62362960
6 changed files with 20 additions and 11 deletions

View file

@ -1134,7 +1134,7 @@ ModelObjectPtrs ModelObject::cut(size_t instance, coordf_t z, bool keep_upper, b
if (keep_upper) {
upper->set_model(nullptr);
upper->sla_support_points.clear();
upper->sla_points_status = sla::PointsStatus::None;
upper->sla_points_status = sla::PointsStatus::NoPoints;
upper->clear_volumes();
upper->input_file = "";
}
@ -1142,7 +1142,7 @@ ModelObjectPtrs ModelObject::cut(size_t instance, coordf_t z, bool keep_upper, b
if (keep_lower) {
lower->set_model(nullptr);
lower->sla_support_points.clear();
lower->sla_points_status = sla::PointsStatus::None;
lower->sla_points_status = sla::PointsStatus::NoPoints;
lower->clear_volumes();
lower->input_file = "";
}

View file

@ -199,7 +199,7 @@ public:
std::vector<sla::SupportPoint> sla_support_points;
// To keep track of where the points came from (used for synchronization between
// the SLA gizmo and the backend).
sla::PointsStatus sla_points_status = sla::PointsStatus::None;
sla::PointsStatus sla_points_status = sla::PointsStatus::NoPoints;
/* This vector accumulates the total translation applied to the object by the
center_around_origin() method. Callers might want to apply the same translation

View file

@ -18,7 +18,7 @@ namespace sla {
// An enum to keep track of where the current points on the ModelObject came from.
enum class PointsStatus {
None, // No points were generated so far.
NoPoints, // No points were generated so far.
Generating, // The autogeneration algorithm triggered, but not yet finished.
AutoGenerated, // Points were autogenerated (i.e. copied from the backend).
UserModified // User has done some edits.

View file

@ -388,9 +388,9 @@ SLAPrint::ApplyStatus SLAPrint::apply(const Model &model, const DynamicPrintConf
if (it_print_object_status != print_object_status.end())
update_apply_status(it_print_object_status->print_object->invalidate_step(slaposSupportPoints));
model_object.sla_points_status = model_object_new.sla_points_status;
model_object.sla_support_points = model_object_new.sla_support_points;
}
model_object.sla_points_status = model_object_new.sla_points_status;
// Copy the ModelObject name, input_file and instances. The instances will compared against PrintObject instances in the next step.
model_object.name = model_object_new.name;