Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Matena <lukasmatena@seznam.cz>2021-08-30 18:23:44 +0300
committerLukas Matena <lukasmatena@seznam.cz>2021-08-31 10:16:09 +0300
commit270c076e77663895e69d975e276e3edf6643cc1a (patch)
treeac62dd465b39b523a62f08da3509b4cc4e24d471 /src/libslic3r/Model.hpp
parent9a5f61c306ce07739579b8ee67a5bfbc8be5f909 (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.hpp5
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;