WIP Undo / Redo and project state: Marking Undo / Redo snapshots

with their purpose.
This commit is contained in:
Vojtech Bubnik 2021-09-27 14:10:53 +02:00
parent 783c9cf202
commit 41dc265a45
9 changed files with 80 additions and 31 deletions
src/slic3r/GUI

View file

@ -10,6 +10,7 @@
#include "BitmapComboBox.hpp"
#include "GalleryDialog.hpp"
#include "MainFrame.hpp"
#include "slic3r/Utils/UndoRedo.hpp"
#include "OptionsGroup.hpp"
#include "Tab.hpp"
@ -3455,7 +3456,7 @@ void ObjectList::update_selections_on_canvas()
volume_idxs = selection.get_missing_volume_idxs_from(volume_idxs);
if (volume_idxs.size() > 0)
{
Plater::TakeSnapshot snapshot(wxGetApp().plater(), _(L("Selection-Remove from list")));
Plater::TakeSnapshot snapshot(wxGetApp().plater(), _(L("Selection-Remove from list")), UndoRedo::SnapshotType::Selection);
selection.remove_volumes(mode, volume_idxs);
}
}
@ -3463,7 +3464,7 @@ void ObjectList::update_selections_on_canvas()
{
// add
volume_idxs = selection.get_unselected_volume_idxs_from(volume_idxs);
Plater::TakeSnapshot snapshot(wxGetApp().plater(), _(L("Selection-Add from list")));
Plater::TakeSnapshot snapshot(wxGetApp().plater(), _(L("Selection-Add from list")), UndoRedo::SnapshotType::Selection);
selection.add_volumes(mode, volume_idxs, single_selection);
}