diff options
author | Lukas Matena <lukasmatena@seznam.cz> | 2022-05-13 16:43:21 +0300 |
---|---|---|
committer | supermerill <merill@free.fr> | 2022-08-11 00:44:26 +0300 |
commit | 84651e3e2f43ba50d2dd014cba1c9e99d905fd7a (patch) | |
tree | 4de8a9be76cec036e60e1173a7a72bdf52eb82be | |
parent | 635a5ab38fd8b4babec74fa24ba6949e8e190ce5 (diff) |
Fixed a crash when using a selection rectangle in cut gizmo
-rw-r--r-- | src/slic3r/GUI/GLCanvas3D.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/slic3r/GUI/GLCanvas3D.cpp b/src/slic3r/GUI/GLCanvas3D.cpp index 71e76e99f..21aaf2f47 100644 --- a/src/slic3r/GUI/GLCanvas3D.cpp +++ b/src/slic3r/GUI/GLCanvas3D.cpp @@ -6600,12 +6600,13 @@ bool GLCanvas3D::_is_any_volume_outside() const void GLCanvas3D::_update_selection_from_hover() { bool ctrl_pressed = wxGetKeyState(WXK_CONTROL); + bool selection_changed = false; if (m_hover_volume_idxs.empty()) { - if (!ctrl_pressed && (m_rectangle_selection.get_state() == GLSelectionRectangle::Select)) + if (!ctrl_pressed && (m_rectangle_selection.get_state() == GLSelectionRectangle::Select)) { + selection_changed = ! m_selection.is_empty(); m_selection.remove_all(); - - return; + } } GLSelectionRectangle::EState state = m_rectangle_selection.get_state(); @@ -6618,7 +6619,6 @@ void GLCanvas3D::_update_selection_from_hover() } } - bool selection_changed = false; if (state == GLSelectionRectangle::Select) { bool contains_all = true; for (int i : m_hover_volume_idxs) { |