WIP UndoRedo: Added Undo/Redo stack, added Platter::take_snapshot(),

experimental snapshots on loading STLs and increasing / decreasing
model instances.
This commit is contained in:
bubnikv 2019-07-02 16:42:23 +02:00
parent 27ee68d2f9
commit 5e846112ee
13 changed files with 742 additions and 51 deletions

View file

@ -9,6 +9,10 @@
namespace Slic3r {
namespace UndoRedo {
class StackImpl;
};
// Unique identifier of a mutable object accross the application.
// Used to synchronize the front end (UI) with the back end (BackgroundSlicingProcess / Print / PrintObject)
// (for Model, ModelObject, ModelVolume, ModelInstance or ModelMaterial classes)
@ -75,6 +79,7 @@ private:
friend ObjectID wipe_tower_object_id();
friend ObjectID wipe_tower_instance_id();
friend class Slic3r::UndoRedo::StackImpl;
friend class cereal::access;
template<class Archive> void serialize(Archive &ar) { ar(m_id); }
@ -82,6 +87,10 @@ private:
template<class Archive> static void load_and_construct(Archive & ar, cereal::construct<ObjectBase> &construct) { ObjectID id; ar(id); construct(id); }
};
// Unique object / instance ID for the wipe tower.
extern ObjectID wipe_tower_object_id();
extern ObjectID wipe_tower_instance_id();
} // namespace Slic3r
#endif /* slic3r_ObjectID_hpp_ */