From 7ddaa8d3838288ad0097c24eff12e1e4ccb65931 Mon Sep 17 00:00:00 2001 From: Noisyfox Date: Mon, 1 Jan 2024 13:45:53 +0800 Subject: [PATCH] Fix crash when click the color paint gizmo when object part is selected (#3405) Fix crash when click the color paint gizmo when object part is selected (#3404) Cherry-picked from bambulab/BambuStudio@1e99ce9535ace1d1858efe38e5f9a0a7db135a6e Co-authored-by: liz.li (cherry picked from commit 8fd4477110cd88e12ceb26e4db67559de4163326) --- src/slic3r/GUI/Gizmos/GLGizmosCommon.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/slic3r/GUI/Gizmos/GLGizmosCommon.cpp b/src/slic3r/GUI/Gizmos/GLGizmosCommon.cpp index 709cd472574..140bed7565d 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmosCommon.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmosCommon.cpp @@ -110,7 +110,9 @@ void SelectionInfo::on_update() m_model_object = nullptr; - if (selection.is_single_full_instance()) { + // BBS still keep object pointer when selection is volume + // if (selection.is_single_full_instance()) { + if (!selection.is_empty()) { m_model_object = selection.get_model()->objects[selection.get_object_idx()]; m_z_shift = selection.get_first_volume()->get_sla_shift_z(); }