Fixed conflicts after merge with master

This commit is contained in:
Enrico Turri 2020-03-02 11:35:03 +01:00
commit 2f8970de86
60 changed files with 15028 additions and 13576 deletions

View file

@ -20,11 +20,10 @@
namespace Slic3r {
namespace GUI {
GLGizmoHollow::GLGizmoHollow(GLCanvas3D& parent, const std::string& icon_filename, unsigned int sprite_id, CommonGizmosData* cd)
: GLGizmoBase(parent, icon_filename, sprite_id, cd)
GLGizmoHollow::GLGizmoHollow(GLCanvas3D& parent, const std::string& icon_filename, unsigned int sprite_id)
: GLGizmoBase(parent, icon_filename, sprite_id)
, m_quadric(nullptr)
{
m_c->m_clipping_plane.reset(new ClippingPlane(Vec3d::Zero(), 0.));
m_quadric = ::gluNewQuadric();
if (m_quadric != nullptr)
// using GLU_FILL does not work when the instance's transformation
@ -66,22 +65,25 @@ void GLGizmoHollow::set_sla_support_data(ModelObject*, const Selection&)
update_clipping_plane(m_c->m_clipping_plane_was_moved);
// This is a temporary and not very nice hack, to make sure that
// if the cp was moved by the data returned by backend, it will
// remember its direction. FIXME: Refactor this mess and make
// the clipping plane itself part of the shared data.
if (! m_c->m_clipping_plane_was_moved && m_c->m_clipping_plane_distance == 0.25f)
m_c->m_clipping_plane_was_moved = true;
if (m_c->m_model_object) {
reload_cache();
if (m_c->has_drilled_mesh())
m_holes_in_drilled_mesh = m_c->m_model_object->sla_drain_holes;
}
}
if (m_state == On) {
m_parent.toggle_model_objects_visibility(false);
m_parent.toggle_model_objects_visibility(true, m_c->m_model_object, m_c->m_active_instance);
m_parent.toggle_sla_auxiliaries_visibility(m_show_supports, m_c->m_model_object, m_c->m_active_instance);
}
// following was removed so that it does not show the object when it should
// be hidden because the supports gizmo is active. on_set_state takes care
// of showing the object.
//else
// m_parent.toggle_model_objects_visibility(true, nullptr, -1);
if (m_state == On) {
m_parent.toggle_model_objects_visibility(false);
m_parent.toggle_model_objects_visibility(true, m_c->m_model_object, m_c->m_active_instance);
m_parent.toggle_sla_auxiliaries_visibility(m_show_supports, m_c->m_model_object, m_c->m_active_instance);
}
}
@ -1163,6 +1165,13 @@ void GLGizmoHollow::update_clipping_plane(bool keep_normal) const
}
void GLGizmoHollow::on_set_hover_id()
{
if (int(m_c->m_model_object->sla_drain_holes.size()) <= m_hover_id)
m_hover_id = -1;
}
} // namespace GUI