diff options
author | Lukas Matena <lukasmatena@seznam.cz> | 2021-08-30 18:23:44 +0300 |
---|---|---|
committer | Lukas Matena <lukasmatena@seznam.cz> | 2021-08-31 10:16:09 +0300 |
commit | 270c076e77663895e69d975e276e3edf6643cc1a (patch) | |
tree | ac62dd465b39b523a62f08da3509b4cc4e24d471 /src/libslic3r/Model.hpp | |
parent | 9a5f61c306ce07739579b8ee67a5bfbc8be5f909 (diff) |
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.
Diffstat (limited to 'src/libslic3r/Model.hpp')
-rw-r--r-- | src/libslic3r/Model.hpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libslic3r/Model.hpp b/src/libslic3r/Model.hpp index b89dd5aa1..ec6fac821 100644 --- a/src/libslic3r/Model.hpp +++ b/src/libslic3r/Model.hpp @@ -541,7 +541,10 @@ public: indexed_triangle_set get_facets_strict(const ModelVolume& mv, EnforcerBlockerType type) const; bool has_facets(const ModelVolume& mv, EnforcerBlockerType type) const; bool empty() const { return m_data.first.empty(); } - void clear(); + + // Following method clears the config and increases its timestamp, so the deleted + // state is considered changed from perspective of the undo/redo stack. + void reset(); // Serialize triangle into string, for serialization into 3MF/AMF. std::string get_triangle_as_string(int i) const; |