New Undo / Redo stack for the gizmos. The Gizmo specific stack is
entered with Plater::enter_gizmos_stack(), and left with Plater::enter_gizmos_stack(). Other than that, the 2nd Undo / Redo stack is transparent to the user of the Plater. WIP: Currently the Gizmo stack takes a snapshot of the whole scene on Plater::enter_gizmos_stack(). While it should work, it may be cheaper to modify the Undo/Redo stack to only take a snapshot of the gizmos in the Gizmo mode.
This commit is contained in:
@@ -71,7 +71,8 @@ struct Snapshot
|
||||
|
||||
// Excerpt of Slic3r::GUI::Selection for serialization onto the Undo / Redo stack.
|
||||
struct Selection : public Slic3r::ObjectBase {
|
||||
unsigned char mode;
|
||||
void clear() { mode = 0; volumes_and_instances.clear(); }
|
||||
unsigned char mode = 0;
|
||||
std::vector<std::pair<size_t, size_t>> volumes_and_instances;
|
||||
template<class Archive> void serialize(Archive &ar) { ar(mode, volumes_and_instances); }
|
||||
};
|
||||
@@ -86,6 +87,9 @@ public:
|
||||
Stack();
|
||||
~Stack();
|
||||
|
||||
void clear();
|
||||
bool empty() const;
|
||||
|
||||
// Set maximum memory threshold. If the threshold is exceeded, least recently used snapshots are released.
|
||||
void set_memory_limit(size_t memsize);
|
||||
size_t get_memory_limit() const;
|
||||
|
||||
Reference in New Issue
Block a user