Follow-up of bbea397aa6 - Alternate fix for SPE-1675

This commit is contained in:
enricoturri1966 2023-05-12 13:54:37 +02:00
parent a4c772b54e
commit f856129e72
2 changed files with 6 additions and 0 deletions

View File

@ -3509,6 +3509,9 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt)
else if (evt.Leaving()) {
_deactivate_undo_redo_toolbar_items();
if (m_layers_editing.state != LayersEditing::Unknown)
m_layers_editing.state = LayersEditing::Paused;
// to remove hover on objects when the mouse goes out of this canvas
m_mouse.position = Vec2d(-1.0, -1.0);
m_dirty = true;
@ -6556,7 +6559,9 @@ void GLCanvas3D::_perform_layer_editing_action(wxMouseEvent* evt)
m_layers_editing.last_action =
evt->ShiftDown() ? (evt->RightIsDown() ? LAYER_HEIGHT_EDIT_ACTION_SMOOTH : LAYER_HEIGHT_EDIT_ACTION_REDUCE) :
(evt->RightIsDown() ? LAYER_HEIGHT_EDIT_ACTION_INCREASE : LAYER_HEIGHT_EDIT_ACTION_DECREASE);
}
if (m_layers_editing.state != LayersEditing::Paused) {
m_layers_editing.adjust_layer_height_profile();
_refresh_if_shown_on_screen();
}

View File

@ -193,6 +193,7 @@ class GLCanvas3D
Unknown,
Editing,
Completed,
Paused,
Num_States
};