SLA gizmo open/close should be saved on undo/redo stack

This commit is contained in:
Lukas Matena 2019-08-19 12:11:26 +02:00
parent b6d35c9840
commit 409a7c7734
3 changed files with 44 additions and 25 deletions

View file

@ -12,6 +12,7 @@
#include "slic3r/GUI/GUI.hpp"
#include "slic3r/GUI/GUI_ObjectSettings.hpp"
#include "slic3r/GUI/GUI_ObjectList.hpp"
#include "slic3r/GUI/Plater.hpp"
#include "slic3r/GUI/PresetBundle.hpp"
#include "libslic3r/Tesselate.hpp"
@ -1111,6 +1112,11 @@ void GLGizmoSlaSupports::on_set_state()
}
}
if (m_state == m_old_state)
return;
Plater::TakeSnapshot snapshot(wxGetApp().plater(), _(L("SLA gizmo on/off")));
if (m_state == On && m_old_state != On) { // the gizmo was just turned on
Plater::TakeSnapshot snapshot(wxGetApp().plater(), _(L("SLA gizmo turned on")));
if (is_mesh_update_necessary())