mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 08:47:52 -06:00
Merge branch 'dev_native' of https://github.com/prusa3d/Slic3r into dev_native
This commit is contained in:
commit
b788530056
11 changed files with 122 additions and 292 deletions
|
@ -370,6 +370,9 @@ struct Sidebar::priv
|
|||
wxButton *btn_send_gcode;
|
||||
|
||||
priv(Plater *plater) : plater(plater) {}
|
||||
|
||||
bool show_manifold_warning_icon = false;
|
||||
bool show_print_info = false;
|
||||
};
|
||||
|
||||
|
||||
|
@ -550,8 +553,8 @@ int Sidebar::get_ol_selection()
|
|||
void Sidebar::show_info_sizers(const bool show)
|
||||
{
|
||||
p->object_info->Show(show);
|
||||
p->object_info->manifold_warning_icon->Show(show/* && g_show_manifold_warning_icon*/); // where is g_show_manifold_warning_icon updating? #ys_FIXME
|
||||
p->sliced_info->Show(show /*&& g_show_print_info*/); // where is g_show_print_info updating? #ys_FIXME
|
||||
p->object_info->manifold_warning_icon->Show(show && p->show_manifold_warning_icon); // where is g_show_manifold_warning_icon updating? #ys_FIXME
|
||||
p->sliced_info->Show(show && p->show_print_info); // where is g_show_print_info updating? #ys_FIXME
|
||||
}
|
||||
|
||||
void Sidebar::show_buttons(const bool show)
|
||||
|
@ -1052,11 +1055,7 @@ std::vector<size_t> Plater::priv::load_model_objects(const ModelObjectPtrs &mode
|
|||
}
|
||||
|
||||
for (const size_t idx : obj_idxs) {
|
||||
const PlaterObject &object = objects[idx];
|
||||
ModelObject *model_object = model.objects[idx];
|
||||
|
||||
// FIXME: ObjetParts not initialized (via add_frequently_changed_parameters)
|
||||
// GUI::add_object_to_list(object.name, model_object);
|
||||
wxGetApp().obj_list()->add_object_to_list(idx);
|
||||
}
|
||||
|
||||
if (need_arrange) {
|
||||
|
@ -1617,5 +1616,36 @@ void Plater::send_gcode()
|
|||
p->send_gcode_file = export_gcode();
|
||||
}
|
||||
|
||||
void Plater::changed_object_settings(int obj_idx)
|
||||
{
|
||||
if (obj_idx < 0)
|
||||
return;
|
||||
auto list = wxGetApp().obj_list();
|
||||
wxASSERT(list != nullptr);
|
||||
if (list == nullptr)
|
||||
return;
|
||||
|
||||
if (list->is_parts_changed()) {
|
||||
// recenter and re - align to Z = 0
|
||||
auto model_object = p->model.objects[list->get_sel_obj_id()];
|
||||
model_object->center_around_origin();
|
||||
}
|
||||
|
||||
// update print
|
||||
if (list->is_parts_changed() || list->is_part_settings_changed()) {
|
||||
// stop_background_process();
|
||||
// $self->{print}->reload_object($obj_idx);
|
||||
// schedule_background_process();
|
||||
if (p->canvas3D) _3DScene::reload_scene(p->canvas3D, true);
|
||||
auto selections = p->collect_selections();
|
||||
_3DScene::set_objects_selections(p->canvas3D, selections);
|
||||
_3DScene::reload_scene(p->canvas3D, false);
|
||||
}
|
||||
else {
|
||||
// schedule_background_process();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}} // namespace Slic3r::GUI
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue