mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-07-27 21:32:01 +08:00
fix a crash while deleting items too quickly for the gui.
This commit is contained in:
parent
29d393ec9c
commit
8dc9865867
@ -3685,6 +3685,7 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt)
|
|||||||
if (evt.LeftDown() && m_moving_enabled && m_mouse.drag.move_volume_idx == -1) {
|
if (evt.LeftDown() && m_moving_enabled && m_mouse.drag.move_volume_idx == -1) {
|
||||||
// Only accept the initial position, if it is inside the volume bounding box.
|
// Only accept the initial position, if it is inside the volume bounding box.
|
||||||
int volume_idx = get_first_hover_volume_idx();
|
int volume_idx = get_first_hover_volume_idx();
|
||||||
|
if (m_volumes.volumes.size() > volume_idx) { //can fail if the screen takes a bit of time to refresh
|
||||||
BoundingBoxf3 volume_bbox = m_volumes.volumes[volume_idx]->transformed_bounding_box();
|
BoundingBoxf3 volume_bbox = m_volumes.volumes[volume_idx]->transformed_bounding_box();
|
||||||
volume_bbox.offset(1.0);
|
volume_bbox.offset(1.0);
|
||||||
if ((!any_gizmo_active || !evt.CmdDown()) && volume_bbox.contains(m_mouse.scene_position)) {
|
if ((!any_gizmo_active || !evt.CmdDown()) && volume_bbox.contains(m_mouse.scene_position)) {
|
||||||
@ -3699,6 +3700,7 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else if (evt.Dragging() && evt.LeftIsDown() && m_layers_editing.state == LayersEditing::Unknown && m_mouse.drag.move_volume_idx != -1) {
|
else if (evt.Dragging() && evt.LeftIsDown() && m_layers_editing.state == LayersEditing::Unknown && m_mouse.drag.move_volume_idx != -1) {
|
||||||
if (!m_mouse.drag.move_requires_threshold) {
|
if (!m_mouse.drag.move_requires_threshold) {
|
||||||
m_mouse.dragging = true;
|
m_mouse.dragging = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user