mirror of
https://git.mirrors.martin98.com/https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-14 15:55:56 +08:00
fix crash when undo/redo
This commit is contained in:
parent
b8c79d029a
commit
a731241e9c
@ -4346,15 +4346,18 @@ int PartPlateList::rebuild_plates_after_deserialize(std::vector<bool>& previous_
|
|||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
BOOST_LOG_TRIVIAL(debug) << __FUNCTION__ << boost::format(": plates count %1%") % m_plate_list.size();
|
BOOST_LOG_TRIVIAL(debug) << __FUNCTION__ << boost::format(": plates count %1%") % m_plate_list.size();
|
||||||
|
// SoftFever: assign plater info first
|
||||||
|
for (auto partplate : m_plate_list) {
|
||||||
|
partplate->m_plater = this->m_plater;
|
||||||
|
partplate->m_partplate_list = this;
|
||||||
|
partplate->m_model = this->m_model;
|
||||||
|
partplate->printer_technology = this->printer_technology;
|
||||||
|
}
|
||||||
update_plate_cols();
|
update_plate_cols();
|
||||||
set_shapes(m_shape, m_exclude_areas, m_logo_texture_filename, m_height_to_lid, m_height_to_rod);
|
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)
|
for (unsigned int i = 0; i < (unsigned int)m_plate_list.size(); ++i)
|
||||||
{
|
{
|
||||||
bool need_reset_print = false;
|
bool need_reset_print = false;
|
||||||
m_plate_list[i]->m_plater = this->m_plater;
|
|
||||||
m_plate_list[i]->m_partplate_list = this;
|
|
||||||
m_plate_list[i]->m_model = this->m_model;
|
|
||||||
m_plate_list[i]->printer_technology = this->printer_technology;
|
|
||||||
//check the previous sliced result
|
//check the previous sliced result
|
||||||
if (m_plate_list[i]->m_slice_result_valid) {
|
if (m_plate_list[i]->m_slice_result_valid) {
|
||||||
if ((i >= previous_sliced_result.size()) || !previous_sliced_result[i])
|
if ((i >= previous_sliced_result.size()) || !previous_sliced_result[i])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user