mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-05-15 15:38:08 +08:00
SLA gizmo fix: adding points to selection by Shift+click should now work again (was broken by 8466c55)
This commit is contained in:
parent
a5fd9a34e8
commit
0848617fd3
@ -3521,6 +3521,10 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt)
|
|||||||
_update_gizmos_data();
|
_update_gizmos_data();
|
||||||
m_dirty = true;
|
m_dirty = true;
|
||||||
}
|
}
|
||||||
|
else if (evt.LeftDown() && m_gizmos.get_current_type() == Gizmos::SlaSupports && m_gizmos.gizmo_event(SLAGizmoEventType::LeftDown, Vec2d(pos(0), pos(1)), evt.ShiftDown()))
|
||||||
|
{
|
||||||
|
// the gizmo got the event and took some action, there is no need to do anything more
|
||||||
|
}
|
||||||
else if (evt.LeftDown() && !m_selection.is_empty() && m_gizmos.grabber_contains_mouse())
|
else if (evt.LeftDown() && !m_selection.is_empty() && m_gizmos.grabber_contains_mouse())
|
||||||
{
|
{
|
||||||
_update_gizmos_data();
|
_update_gizmos_data();
|
||||||
@ -3536,10 +3540,6 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt)
|
|||||||
|
|
||||||
m_dirty = true;
|
m_dirty = true;
|
||||||
}
|
}
|
||||||
else if (evt.LeftDown() && m_gizmos.get_current_type() == Gizmos::SlaSupports && m_gizmos.gizmo_event(SLAGizmoEventType::LeftDown, Vec2d(pos(0), pos(1)), evt.ShiftDown()))
|
|
||||||
{
|
|
||||||
// the gizmo got the event and took some action, there is no need to do anything more
|
|
||||||
}
|
|
||||||
else if ((selected_object_idx != -1) && evt.RightDown() && m_gizmos.get_current_type() == Gizmos::SlaSupports && m_gizmos.gizmo_event(SLAGizmoEventType::RightDown))
|
else if ((selected_object_idx != -1) && evt.RightDown() && m_gizmos.get_current_type() == Gizmos::SlaSupports && m_gizmos.gizmo_event(SLAGizmoEventType::RightDown))
|
||||||
{
|
{
|
||||||
// event was taken care of by the SlaSupports gizmo
|
// event was taken care of by the SlaSupports gizmo
|
||||||
|
@ -328,6 +328,10 @@ bool GLGizmoSlaSupports::gizmo_event(SLAGizmoEventType action, const Vec2d& mous
|
|||||||
|
|
||||||
// left down without selection rectangle - place point on the mesh:
|
// left down without selection rectangle - place point on the mesh:
|
||||||
if (action == SLAGizmoEventType::LeftDown && !m_selection_rectangle_active && !shift_down) {
|
if (action == SLAGizmoEventType::LeftDown && !m_selection_rectangle_active && !shift_down) {
|
||||||
|
// If any point is in hover state, this should initiate its move - return control back to GLCanvas:
|
||||||
|
if (m_hover_id != -1)
|
||||||
|
return false;
|
||||||
|
|
||||||
// If there is some selection, don't add new point and deselect everything instead.
|
// If there is some selection, don't add new point and deselect everything instead.
|
||||||
if (m_selection_empty) {
|
if (m_selection_empty) {
|
||||||
try {
|
try {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user