Fixed undo/redo issue when clear method of FacetsAnnotation and ModelConfig
reset timestamp to 1. This led to a bug where e.g. deleting painted facets through the respective item in object list followed by possible other actions and undo restored the painted facets from the time when the project was loaded. I'm not sure if there was any other situation where this problem manifested.
This commit is contained in:
parent
9a5f61c306
commit
270c076e77
6 changed files with 22 additions and 20 deletions
src/libslic3r
|
@ -1198,9 +1198,9 @@ ModelObjectPtrs ModelObject::cut(size_t instance, coordf_t z, ModelObjectCutAttr
|
|||
for (ModelVolume *volume : volumes) {
|
||||
const auto volume_matrix = volume->get_matrix();
|
||||
|
||||
volume->supported_facets.clear();
|
||||
volume->seam_facets.clear();
|
||||
volume->mmu_segmentation_facets.clear();
|
||||
volume->supported_facets.reset();
|
||||
volume->seam_facets.reset();
|
||||
volume->mmu_segmentation_facets.reset();
|
||||
|
||||
if (! volume->is_model_part()) {
|
||||
// Modifiers are not cut, but we still need to add the instance transformation
|
||||
|
@ -2019,11 +2019,11 @@ bool FacetsAnnotation::set(const TriangleSelector& selector)
|
|||
return false;
|
||||
}
|
||||
|
||||
void FacetsAnnotation::clear()
|
||||
void FacetsAnnotation::reset()
|
||||
{
|
||||
m_data.first.clear();
|
||||
m_data.second.clear();
|
||||
this->reset_timestamp();
|
||||
this->touch();
|
||||
}
|
||||
|
||||
// Following function takes data from a triangle and encodes it as string
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue