From ac103f334ce664aa4aff663d75d8700c9c2ef08d Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Sat, 14 Mar 2020 09:18:08 +0100 Subject: [PATCH] Actual fix of the rare crash recently mentioned in e547a0c The problem was in fact elsewhere. After an object is added, it is necessary to update the gizmos. GLGizmoManager::update_data needs to be called, but regardless of whether any gizmo is currently opened (which is what is_running returns). To reproduce the crash that this fixes: add an object, delete it, add another one, open SLA gizmo -> crash --- src/slic3r/GUI/Plater.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index 04f1a6b87..9918328f8 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -2527,9 +2527,8 @@ std::vector Plater::priv::load_files(const std::vector& input_ selection.add_object((unsigned int)idx, false); } - if (view3D->get_canvas3d()->get_gizmos_manager().is_running()) - // this is required because the selected object changed and the flatten on face an sla support gizmos need to be updated accordingly - view3D->get_canvas3d()->update_gizmos_on_off_state(); + // this is required because the selected object changed and the flatten on face an sla support gizmos need to be updated accordingly + view3D->get_canvas3d()->update_gizmos_on_off_state(); } return obj_idxs;