Flatten gizmo now respects sla_shift_z

This commit is contained in:
Lukas Matena 2018-12-21 13:19:10 +01:00
parent 72e9a2615f
commit 20a4593ee1

View File

@ -1466,6 +1466,7 @@ void GLGizmoFlatten::on_render(const GLCanvas3D::Selection& selection) const
const Transform3d& m = selection.get_volume(*selection.get_volume_idxs().begin())->get_instance_transformation().get_matrix();
::glPushMatrix();
::glMultMatrixd(m.data());
::glTranslatef(0.f, 0.f, selection.get_volume(*selection.get_volume_idxs().begin())->get_sla_shift_z());
for (int i = 0; i < (int)m_planes.size(); ++i)
{
if (i == m_hover_id)
@ -1497,6 +1498,7 @@ void GLGizmoFlatten::on_render_for_picking(const GLCanvas3D::Selection& selectio
const Transform3d& m = selection.get_volume(*selection.get_volume_idxs().begin())->get_instance_transformation().get_matrix();
::glPushMatrix();
::glMultMatrixd(m.data());
::glTranslatef(0.f, 0.f, selection.get_volume(*selection.get_volume_idxs().begin())->get_sla_shift_z());
for (int i = 0; i < (int)m_planes.size(); ++i)
{
::glColor3f(1.0f, 1.0f, picking_color_component(i));