mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-16 11:17:51 -06:00
Fix a few issues in cut gizmo
This commit is contained in:
parent
1fedcb61b7
commit
c5b209270c
1 changed files with 11 additions and 17 deletions
|
@ -411,32 +411,26 @@ CommonGizmosDataID GLGizmoAdvancedCut::on_get_requirements() const
|
||||||
|
|
||||||
void GLGizmoAdvancedCut::on_start_dragging()
|
void GLGizmoAdvancedCut::on_start_dragging()
|
||||||
{
|
{
|
||||||
for (auto gizmo : m_gizmos) {
|
if (m_hover_id == X || m_hover_id == Y || m_hover_id == Z) {
|
||||||
if (m_hover_id == gizmo.get_group_id()) {
|
m_gizmos[m_hover_id].start_dragging();
|
||||||
gizmo.start_dragging();
|
} else if (m_hover_id == c_connectors_group_id - 1) {
|
||||||
return;
|
const Selection& selection = m_parent.get_selection();
|
||||||
}
|
const BoundingBoxf3& box = selection.get_bounding_box();
|
||||||
|
m_start_movement = m_movement;
|
||||||
|
m_start_height = m_height;
|
||||||
|
m_drag_pos = m_move_grabber.center;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_hover_id != get_group_id())
|
|
||||||
return;
|
|
||||||
|
|
||||||
const Selection& selection = m_parent.get_selection();
|
|
||||||
const BoundingBoxf3& box = selection.get_bounding_box();
|
|
||||||
m_start_movement = m_movement;
|
|
||||||
m_start_height = m_height;
|
|
||||||
m_drag_pos = m_move_grabber.center;
|
|
||||||
|
|
||||||
if (m_hover_id >= c_connectors_group_id)
|
|
||||||
Plater::TakeSnapshot snapshot(wxGetApp().plater(), "Move connector");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLGizmoAdvancedCut::on_stop_dragging()
|
void GLGizmoAdvancedCut::on_stop_dragging()
|
||||||
{
|
{
|
||||||
if (m_hover_id == X || m_hover_id == Y || m_hover_id == Z) {
|
if (m_hover_id == X || m_hover_id == Y || m_hover_id == Z) {
|
||||||
|
m_gizmos[m_hover_id].stop_dragging();
|
||||||
Plater::TakeSnapshot snapshot(wxGetApp().plater(), "Rotate cut plane");
|
Plater::TakeSnapshot snapshot(wxGetApp().plater(), "Rotate cut plane");
|
||||||
} else if (m_hover_id == c_connectors_group_id - 1) {
|
} else if (m_hover_id == c_connectors_group_id - 1) {
|
||||||
Plater::TakeSnapshot snapshot(wxGetApp().plater(), "Move cut plane");
|
Plater::TakeSnapshot snapshot(wxGetApp().plater(), "Move cut plane");
|
||||||
|
} else if (m_hover_id >= c_connectors_group_id) {
|
||||||
|
Plater::TakeSnapshot snapshot(wxGetApp().plater(), "Move connector");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue