mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 08:47:52 -06:00
Merge remote-tracking branch 'origin/master' into ys_new_features
This commit is contained in:
commit
daac165a44
44 changed files with 2572 additions and 646 deletions
|
@ -1785,6 +1785,9 @@ Plater::priv::priv(Plater *q, MainFrame *main_frame)
|
|||
q->Layout();
|
||||
|
||||
set_current_panel(view3D);
|
||||
|
||||
// updates camera type from .ini file
|
||||
camera.set_type(get_config("camera_type"));
|
||||
}
|
||||
|
||||
void Plater::priv::update(bool force_full_scene_refresh)
|
||||
|
@ -4204,30 +4207,14 @@ void Plater::update_object_menu() { p->update_object_menu(); }
|
|||
|
||||
void Plater::copy_selection_to_clipboard()
|
||||
{
|
||||
p->view3D->get_canvas3d()->get_selection().copy_to_clipboard();
|
||||
if (can_copy_to_clipboard())
|
||||
p->view3D->get_canvas3d()->get_selection().copy_to_clipboard();
|
||||
}
|
||||
|
||||
void Plater::paste_from_clipboard()
|
||||
{
|
||||
p->view3D->get_canvas3d()->get_selection().paste_from_clipboard();
|
||||
}
|
||||
|
||||
bool Plater::can_paste_from_clipboard() const
|
||||
{
|
||||
const Selection& selection = p->view3D->get_canvas3d()->get_selection();
|
||||
const Selection::Clipboard& clipboard = selection.get_clipboard();
|
||||
Selection::EMode mode = clipboard.get_mode();
|
||||
|
||||
if (clipboard.is_empty())
|
||||
return false;
|
||||
|
||||
if ((mode == Selection::Volume) && !selection.is_from_single_instance())
|
||||
return false;
|
||||
|
||||
if ((mode == Selection::Instance) && (selection.get_mode() != Selection::Instance))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
if (can_paste_from_clipboard())
|
||||
p->view3D->get_canvas3d()->get_selection().paste_from_clipboard();
|
||||
}
|
||||
|
||||
void Plater::msw_rescale()
|
||||
|
@ -4254,7 +4241,37 @@ bool Plater::can_split_to_objects() const { return p->can_split_to_objects(); }
|
|||
bool Plater::can_split_to_volumes() const { return p->can_split_to_volumes(); }
|
||||
bool Plater::can_arrange() const { return p->can_arrange(); }
|
||||
bool Plater::can_layers_editing() const { return p->can_layers_editing(); }
|
||||
bool Plater::can_copy() const { return !is_selection_empty(); }
|
||||
bool Plater::can_paste() const { return can_paste_from_clipboard(); }
|
||||
bool Plater::can_paste_from_clipboard() const
|
||||
{
|
||||
const Selection& selection = p->view3D->get_canvas3d()->get_selection();
|
||||
const Selection::Clipboard& clipboard = selection.get_clipboard();
|
||||
|
||||
if (clipboard.is_empty())
|
||||
return false;
|
||||
|
||||
if ((wxGetApp().preset_bundle->printers.get_edited_preset().printer_technology() == ptSLA) && !clipboard.is_sla_compliant())
|
||||
return false;
|
||||
|
||||
Selection::EMode mode = clipboard.get_mode();
|
||||
if ((mode == Selection::Volume) && !selection.is_from_single_instance())
|
||||
return false;
|
||||
|
||||
if ((mode == Selection::Instance) && (selection.get_mode() != Selection::Instance))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Plater::can_copy_to_clipboard() const
|
||||
{
|
||||
if (is_selection_empty())
|
||||
return false;
|
||||
|
||||
const Selection& selection = p->view3D->get_canvas3d()->get_selection();
|
||||
if ((wxGetApp().preset_bundle->printers.get_edited_preset().printer_technology() == ptSLA) && !selection.is_sla_compliant())
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}} // namespace Slic3r::GUI
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue