WIP Undo / Redo : serialization / deserialization of object selection.

This commit is contained in:
bubnikv 2019-07-04 14:35:04 +02:00
parent 5a2ace1a6e
commit 1798e2a84c
6 changed files with 85 additions and 58 deletions

View file

@ -3,7 +3,6 @@
#include <set>
#include "libslic3r/Geometry.hpp"
#include "libslic3r/ObjectID.hpp"
#include "3DScene.hpp"
#if ENABLE_RENDER_SELECTION_CENTER
@ -67,7 +66,7 @@ private:
Enum m_value;
};
class Selection : public Slic3r::ObjectBase
class Selection
{
public:
typedef std::set<unsigned int> IndicesList;
@ -238,6 +237,9 @@ public:
void add_all();
// To be called after Undo or Redo once the volumes are updated.
void set_deserialized(EMode mode, const std::vector<std::pair<ObjectID, ObjectID>> &volumes_and_instances);
// Update the selection based on the new instance IDs.
void instances_changed(const std::vector<size_t> &instance_ids_selected);
// Update the selection based on the map from old indices to new indices after m_volumes changed.