FIX: Cannot undo after moving the connector

Jira: STUDIO-4506
Change-Id: I53de8eb3a884de1acb02b825f826bdad2547ad64
This commit is contained in:
zhou.xu 2023-09-18 20:10:47 +08:00 committed by Lane.Wei
parent b4e675f627
commit a92a138918
1 changed files with 4 additions and 3 deletions

View File

@ -452,6 +452,10 @@ CommonGizmosDataID GLGizmoAdvancedCut::on_get_requirements() const
void GLGizmoAdvancedCut::on_start_dragging()
{
if (m_connectors_editing && m_hover_id >= c_connectors_group_id) {
Plater::TakeSnapshot snapshot(wxGetApp().plater(), "Move connector");
return;
}
for (auto gizmo : m_gizmos) {
if (m_hover_id == gizmo.get_group_id()) {
gizmo.start_dragging();
@ -467,9 +471,6 @@ void GLGizmoAdvancedCut::on_start_dragging()
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()