Merge remote-tracking branch 'origin/tm_sla_supports_backend' into dev_native

This commit is contained in:
tamasmeszaros 2018-11-12 17:42:20 +01:00
commit c6695538a9
5 changed files with 76 additions and 2 deletions

View file

@ -2,6 +2,7 @@
#include "GLGizmo.hpp"
#include "GUI.hpp"
#include "GUI_App.hpp"
#include "../../libslic3r/Utils.hpp"
@ -1680,6 +1681,9 @@ void GLGizmoSlaSupports::clicked_on_object(const Vec2d& mouse_position)
m_grabbers.push_back(Grabber());
m_grabbers.back().center = new_pos.cast<double>();
m_model_object->sla_support_points.push_back(new_pos);
// This should trigger the support generation
wxGetApp().plater()->reslice();
}
catch (...) {}
}
@ -1689,12 +1693,18 @@ void GLGizmoSlaSupports::delete_current_grabber(bool delete_all)
if (delete_all) {
m_grabbers.clear();
m_model_object->sla_support_points.clear();
// This should trigger the support generation
wxGetApp().plater()->reslice();
}
else
if (m_hover_id != -1) {
m_grabbers.erase(m_grabbers.begin() + m_hover_id);
m_model_object->sla_support_points.erase(m_model_object->sla_support_points.begin() + m_hover_id);
m_hover_id = -1;
// This should trigger the support generation
wxGetApp().plater()->reslice();
}
}