FIX:cancel undo/redo function of plate related geometric parameters
Jira: STUDIO-4864 Change-Id: I97dffd03bcdc7988edd09d99e612dbdced072009
This commit is contained in:
parent
6f8f0b1b7a
commit
633f1b05ec
|
@ -3061,14 +3061,8 @@ void PartPlateList::init()
|
|||
Vec3d PartPlateList::compute_origin(int i, int cols)
|
||||
{
|
||||
Vec3d origin;
|
||||
int row, col;
|
||||
|
||||
row = i / cols;
|
||||
col = i % cols;
|
||||
|
||||
origin(0) = col * (m_plate_width * (1. + LOGICAL_PART_PLATE_GAP));
|
||||
origin(1) = -row * (m_plate_depth * (1. + LOGICAL_PART_PLATE_GAP));
|
||||
origin(2) = 0;
|
||||
Vec2d pos = compute_shape_position(i, cols);
|
||||
origin = Vec3d(pos.x(), pos.y(), 0);
|
||||
|
||||
return origin;
|
||||
}
|
||||
|
@ -4919,6 +4913,7 @@ int PartPlateList::rebuild_plates_after_deserialize(std::vector<bool>& 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);
|
||||
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)
|
||||
{
|
||||
|
|
|
@ -480,7 +480,7 @@ public:
|
|||
std::vector<std::pair<int, int>> objects_and_instances;
|
||||
std::vector<std::pair<int, int>> instances_outside;
|
||||
|
||||
ar(m_plate_index, m_print_index, m_origin, m_width, m_depth, m_height, m_locked, m_selected, m_ready_for_slice, m_slice_result_valid, m_apply_invalid, m_printable, m_tmp_gcode_path, objects_and_instances, instances_outside, m_config, m_name);
|
||||
ar(m_plate_index, m_print_index, m_locked, m_selected, m_ready_for_slice, m_slice_result_valid, m_apply_invalid, m_printable, m_tmp_gcode_path, objects_and_instances, instances_outside, m_config, m_name);
|
||||
|
||||
for (std::vector<std::pair<int, int>>::iterator it = objects_and_instances.begin(); it != objects_and_instances.end(); ++it)
|
||||
obj_to_instance_set.insert(std::pair(it->first, it->second));
|
||||
|
@ -498,7 +498,7 @@ public:
|
|||
for (std::set<std::pair<int, int>>::iterator it = obj_to_instance_set.begin(); it != obj_to_instance_set.end(); ++it)
|
||||
objects_and_instances.emplace_back(it->first, it->second);
|
||||
|
||||
ar(m_plate_index, m_print_index, m_origin, m_width, m_depth, m_height, m_locked, m_selected, m_ready_for_slice, m_slice_result_valid, m_apply_invalid, m_printable,m_tmp_gcode_path, objects_and_instances, instances_outside, m_config, m_name);
|
||||
ar(m_plate_index, m_print_index, m_locked, m_selected, m_ready_for_slice, m_slice_result_valid, m_apply_invalid, m_printable,m_tmp_gcode_path, objects_and_instances, instances_outside, m_config, m_name);
|
||||
}
|
||||
/*template<class Archive> void serialize(Archive& ar)
|
||||
{
|
||||
|
@ -825,8 +825,8 @@ public:
|
|||
template<class Archive> void serialize(Archive& ar)
|
||||
{
|
||||
//ar(cereal::base_class<ObjectBase>(this));
|
||||
//Cancel undo/redo for m_shape ,Because the printing area of different models is different, currently if the grid changes, it cannot correspond to the model on the left ui
|
||||
ar(m_plate_width, m_plate_depth, m_plate_height, m_height_to_lid, m_height_to_rod, m_height_limit_mode, m_plate_count, m_current_plate, m_plate_list, unprintable_plate);
|
||||
//Cancel undo/redo for m_shape ,m_plate_width, m_plate_depth, m_plate_height,Because the printing area of different models is different, currently if the grid changes, it cannot correspond to the model on the left ui
|
||||
ar(m_height_to_lid, m_height_to_rod, m_height_limit_mode, m_plate_count, m_current_plate, m_plate_list, unprintable_plate);
|
||||
//ar(m_plate_width, m_plate_depth, m_plate_height, m_plate_count, m_current_plate);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue