mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-24 15:13:58 -06:00
Keep fixed radius of rotate gizmo
This commit is contained in:
parent
1356a9977e
commit
0e9ac1679f
5 changed files with 72 additions and 2 deletions
|
@ -1291,6 +1291,16 @@ void GLCanvas3D::Gizmos::update(const Pointf& mouse_pos)
|
|||
curr->update(mouse_pos);
|
||||
}
|
||||
|
||||
void GLCanvas3D::Gizmos::refresh()
|
||||
{
|
||||
if (!m_enabled)
|
||||
return;
|
||||
|
||||
GLGizmoBase* curr = _get_current();
|
||||
if (curr != nullptr)
|
||||
curr->refresh();
|
||||
}
|
||||
|
||||
GLCanvas3D::Gizmos::EType GLCanvas3D::Gizmos::get_current_type() const
|
||||
{
|
||||
return m_current;
|
||||
|
@ -1321,6 +1331,9 @@ void GLCanvas3D::Gizmos::start_dragging()
|
|||
void GLCanvas3D::Gizmos::stop_dragging()
|
||||
{
|
||||
m_dragging = false;
|
||||
GLGizmoBase* curr = _get_current();
|
||||
if (curr != nullptr)
|
||||
curr->stop_dragging();
|
||||
}
|
||||
|
||||
float GLCanvas3D::Gizmos::get_scale() const
|
||||
|
@ -2853,6 +2866,7 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt)
|
|||
}
|
||||
|
||||
update_gizmos_data();
|
||||
m_gizmos.refresh();
|
||||
m_dirty = true;
|
||||
}
|
||||
}
|
||||
|
@ -2942,6 +2956,7 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt)
|
|||
}
|
||||
|
||||
m_mouse.drag.start_position_3D = cur_pos;
|
||||
m_gizmos.refresh();
|
||||
|
||||
m_dirty = true;
|
||||
}
|
||||
|
@ -3002,6 +3017,9 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt)
|
|||
m_on_update_geometry_info_callback.call(size.x, size.y, size.z, m_gizmos.get_scale());
|
||||
}
|
||||
|
||||
if (volumes.size() > 1)
|
||||
m_gizmos.refresh();
|
||||
|
||||
m_dirty = true;
|
||||
}
|
||||
else if (evt.Dragging() && !gizmos_overlay_contains_mouse)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue