From 232bd94ac7047b1371000527e5eac1567277bbc2 Mon Sep 17 00:00:00 2001 From: "zhou.xu" Date: Mon, 30 Oct 2023 10:39:45 +0800 Subject: [PATCH] FIX:When undo, m_model is empty Jira: STUDIO-4978 Change-Id: I73d468ceb567a9caf5109dbd0e00b5b0ea3beb52 --- src/slic3r/GUI/PartPlate.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/slic3r/GUI/PartPlate.cpp b/src/slic3r/GUI/PartPlate.cpp index 4e3b285fd..e977eec36 100644 --- a/src/slic3r/GUI/PartPlate.cpp +++ b/src/slic3r/GUI/PartPlate.cpp @@ -1789,7 +1789,7 @@ void PartPlate::set_pos_and_size(Vec3d& origin, int width, int depth, int height return; } - if (with_instance_move) + if (with_instance_move && m_model) { for (std::set>::iterator it = obj_to_instance_set.begin(); it != obj_to_instance_set.end(); ++it) { int obj_id = it->first; @@ -4913,7 +4913,7 @@ int PartPlateList::rebuild_plates_after_deserialize(std::vector& previous_ BOOST_LOG_TRIVIAL(debug) << __FUNCTION__ << boost::format(": plates count %1%") % m_plate_list.size(); update_plate_cols(); - update_all_plates_pos_and_size(true, false); + update_all_plates_pos_and_size(false, false); set_shapes(m_shape, m_exclude_areas, m_logo_texture_filename, m_height_to_lid, m_height_to_rod); for (unsigned int i = 0; i < (unsigned int)m_plate_list.size(); ++i) {