FDM supports gizmo - use right mouse to place support blockers

This commit is contained in:
Lukas Matena 2020-04-08 14:59:53 +02:00
parent 55c87886fa
commit 4d8e6538e8
4 changed files with 42 additions and 11 deletions

View file

@ -558,8 +558,8 @@ bool GLGizmosManager::on_mouse(wxMouseEvent& evt)
processed = true;
m_mouse_capture.right = false;
}
else
return false;
// else
// return false;
}
#if ENABLE_GIZMO_TOOLBAR_DRAGGING_FIX
else if (evt.Dragging() && !is_dragging())
@ -666,13 +666,20 @@ bool GLGizmosManager::on_mouse(wxMouseEvent& evt)
processed = true;
}
}
else if (evt.RightDown() && (selected_object_idx != -1) && (m_current == SlaSupports || m_current == Hollow) && gizmo_event(SLAGizmoEventType::RightDown))
else if (evt.RightDown() && (selected_object_idx != -1) && (m_current == SlaSupports || m_current == Hollow)
&& gizmo_event(SLAGizmoEventType::RightDown, mouse_pos))
{
// we need to set the following right up as processed to avoid showing the context menu if the user release the mouse over the object
pending_right_up = true;
// event was taken care of by the SlaSupports gizmo
processed = true;
}
else if (evt.RightDown() && (selected_object_idx != -1) && m_current == FdmSupports
&& gizmo_event(SLAGizmoEventType::RightDown, mouse_pos))
{
// event was taken care of by the FdmSupports gizmo
processed = true;
}
else if (evt.Dragging() && (m_parent.get_move_volume_id() != -1) && (m_current == SlaSupports || m_current == Hollow))
// don't allow dragging objects with the Sla gizmo on
processed = true;
@ -766,6 +773,11 @@ bool GLGizmosManager::on_mouse(wxMouseEvent& evt)
// to avoid to loose the selection when user clicks an the white faces of a different object while the Flatten gizmo is active
processed = true;
}
else if (evt.RightUp() && m_current == FdmSupports && !m_parent.is_mouse_dragging())
{
gizmo_event(SLAGizmoEventType::RightUp, mouse_pos, evt.ShiftDown(), evt.AltDown(), evt.ControlDown());
processed = true;
}
}
else
{