Planes of gizmo flatten visible from both sides
This commit is contained in:
parent
bcffa8dbe2
commit
42a77316ba
2 changed files with 7 additions and 2 deletions
|
@ -3941,9 +3941,9 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt)
|
||||||
}
|
}
|
||||||
#endif // ENABLE_EXTENDED_SELECTION
|
#endif // ENABLE_EXTENDED_SELECTION
|
||||||
#if ENABLE_EXTENDED_SELECTION
|
#if ENABLE_EXTENDED_SELECTION
|
||||||
else if (!m_selection.is_empty() && m_gizmos.grabber_contains_mouse())
|
else if (evt.LeftDown() && !m_selection.is_empty() && m_gizmos.grabber_contains_mouse())
|
||||||
#else
|
#else
|
||||||
else if ((selected_object_idx != -1) && m_gizmos.grabber_contains_mouse())
|
else if (evt.LeftDown() && (selected_object_idx != -1) && m_gizmos.grabber_contains_mouse())
|
||||||
#endif // ENABLE_EXTENDED_SELECTION
|
#endif // ENABLE_EXTENDED_SELECTION
|
||||||
{
|
{
|
||||||
update_gizmos_data();
|
update_gizmos_data();
|
||||||
|
|
|
@ -1474,6 +1474,7 @@ void GLGizmoFlatten::on_render(const BoundingBoxf3& box) const
|
||||||
|
|
||||||
::glEnable(GL_BLEND);
|
::glEnable(GL_BLEND);
|
||||||
::glEnable(GL_DEPTH_TEST);
|
::glEnable(GL_DEPTH_TEST);
|
||||||
|
::glDisable(GL_CULL_FACE);
|
||||||
|
|
||||||
for (int i=0; i<(int)m_planes.size(); ++i) {
|
for (int i=0; i<(int)m_planes.size(); ++i) {
|
||||||
if (i == m_hover_id)
|
if (i == m_hover_id)
|
||||||
|
@ -1512,6 +1513,7 @@ void GLGizmoFlatten::on_render(const BoundingBoxf3& box) const
|
||||||
#endif // ENABLE_EXTENDED_SELECTION
|
#endif // ENABLE_EXTENDED_SELECTION
|
||||||
}
|
}
|
||||||
|
|
||||||
|
::glEnable(GL_CULL_FACE);
|
||||||
::glDisable(GL_BLEND);
|
::glDisable(GL_BLEND);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1522,6 +1524,7 @@ void GLGizmoFlatten::on_render_for_picking(const BoundingBoxf3& box) const
|
||||||
#endif // ENABLE_EXTENDED_SELECTION
|
#endif // ENABLE_EXTENDED_SELECTION
|
||||||
{
|
{
|
||||||
::glEnable(GL_DEPTH_TEST);
|
::glEnable(GL_DEPTH_TEST);
|
||||||
|
::glDisable(GL_CULL_FACE);
|
||||||
|
|
||||||
for (unsigned int i = 0; i < m_planes.size(); ++i)
|
for (unsigned int i = 0; i < m_planes.size(); ++i)
|
||||||
{
|
{
|
||||||
|
@ -1552,6 +1555,8 @@ void GLGizmoFlatten::on_render_for_picking(const BoundingBoxf3& box) const
|
||||||
}
|
}
|
||||||
#endif // ENABLE_EXTENDED_SELECTION
|
#endif // ENABLE_EXTENDED_SELECTION
|
||||||
}
|
}
|
||||||
|
|
||||||
|
::glEnable(GL_CULL_FACE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLGizmoFlatten::set_flattening_data(const ModelObject* model_object)
|
void GLGizmoFlatten::set_flattening_data(const ModelObject* model_object)
|
||||||
|
|
Loading…
Reference in a new issue