Fixed copying of some object's attributes into the clipboard
(layer height profile, layer height table etc) Added public Plater::schedule_background_process()
This commit is contained in:
parent
cfa4f3f4d6
commit
b0c33a1fe9
3 changed files with 17 additions and 5 deletions
|
@ -3698,6 +3698,11 @@ void Plater::changed_object(int obj_idx)
|
|||
this->p->schedule_background_process();
|
||||
}
|
||||
|
||||
void Plater::schedule_background_process()
|
||||
{
|
||||
this->p->schedule_background_process();
|
||||
}
|
||||
|
||||
void Plater::fix_through_netfabb(const int obj_idx, const int vol_idx/* = -1*/) { p->fix_through_netfabb(obj_idx, vol_idx); }
|
||||
|
||||
void Plater::update_object_menu() { p->update_object_menu(); }
|
||||
|
|
|
@ -162,6 +162,7 @@ public:
|
|||
void reslice();
|
||||
void reslice_SLA_supports(const ModelObject &object);
|
||||
void changed_object(int obj_idx);
|
||||
void schedule_background_process();
|
||||
void fix_through_netfabb(const int obj_idx, const int vol_idx = -1);
|
||||
void send_gcode();
|
||||
|
||||
|
|
|
@ -1033,9 +1033,14 @@ void Selection::copy_to_clipboard()
|
|||
{
|
||||
ModelObject* src_object = m_model->objects[object.first];
|
||||
ModelObject* dst_object = m_clipboard.add_object();
|
||||
dst_object->name = src_object->name;
|
||||
dst_object->input_file = src_object->input_file;
|
||||
dst_object->config = src_object->config;
|
||||
dst_object->name = src_object->name;
|
||||
dst_object->input_file = src_object->input_file;
|
||||
dst_object->config = src_object->config;
|
||||
dst_object->sla_support_points = src_object->sla_support_points;
|
||||
dst_object->sla_points_status = src_object->sla_points_status;
|
||||
dst_object->layer_height_ranges = src_object->layer_height_ranges;
|
||||
dst_object->layer_height_profile = src_object->layer_height_profile;
|
||||
dst_object->origin_translation = src_object->origin_translation;
|
||||
|
||||
for (int i : object.second)
|
||||
{
|
||||
|
@ -1044,6 +1049,7 @@ void Selection::copy_to_clipboard()
|
|||
|
||||
for (unsigned int i : m_list)
|
||||
{
|
||||
// Copy the ModelVolumes only for the selected GLVolumes of the 1st selected instance.
|
||||
const GLVolume* volume = (*m_volumes)[i];
|
||||
if ((volume->object_idx() == object.first) && (volume->instance_idx() == *object.second.begin()))
|
||||
{
|
||||
|
@ -1053,7 +1059,8 @@ void Selection::copy_to_clipboard()
|
|||
ModelVolume* src_volume = src_object->volumes[volume_idx];
|
||||
ModelVolume* dst_volume = dst_object->add_volume(*src_volume);
|
||||
dst_volume->set_new_unique_id();
|
||||
dst_volume->config = src_volume->config;
|
||||
} else {
|
||||
assert(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1776,7 +1783,6 @@ void Selection::paste_volumes_from_clipboard()
|
|||
for (ModelVolume* src_volume : src_object->volumes)
|
||||
{
|
||||
ModelVolume* dst_volume = dst_object->add_volume(*src_volume);
|
||||
dst_volume->config = src_volume->config;
|
||||
dst_volume->set_new_unique_id();
|
||||
double offset = wxGetApp().plater()->canvas3D()->get_size_proportional_to_max_bed_size(0.05);
|
||||
dst_volume->translate(offset, offset, 0.0);
|
||||
|
|
Loading…
Reference in a new issue