mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57:53 -06:00
Fixed conflicts after merge with master
This commit is contained in:
commit
29cbfa7c9e
45 changed files with 1404 additions and 234 deletions
|
@ -79,6 +79,11 @@
|
|||
#include "../Utils/FixModelByWin10.hpp"
|
||||
#include "../Utils/UndoRedo.hpp"
|
||||
#include "RemovableDriveManager.hpp"
|
||||
#if ENABLE_NON_STATIC_CANVAS_MANAGER
|
||||
#ifdef __APPLE__
|
||||
#include "Gizmos/GLGizmosManager.hpp"
|
||||
#endif // __APPLE__
|
||||
#endif // ENABLE_NON_STATIC_CANVAS_MANAGER
|
||||
|
||||
#include <wx/glcanvas.h> // Needs to be last because reasons :-/
|
||||
#include "WipeTowerDialog.hpp"
|
||||
|
@ -1821,8 +1826,18 @@ struct Plater::priv
|
|||
bool are_view3D_labels_shown() const { return (current_panel == view3D) && view3D->get_canvas3d()->are_labels_shown(); }
|
||||
void show_view3D_labels(bool show) { if (current_panel == view3D) view3D->get_canvas3d()->show_labels(show); }
|
||||
|
||||
#if ENABLE_SLOPE_RENDERING
|
||||
bool is_view3D_slope_shown() const { return (current_panel == view3D) && view3D->get_canvas3d()->is_slope_shown(); }
|
||||
void show_view3D_slope(bool show) { if (current_panel == view3D) view3D->get_canvas3d()->show_slope(show); }
|
||||
|
||||
bool is_view3D_layers_editing_enabled() const { return (current_panel == view3D) && view3D->get_canvas3d()->is_layers_editing_enabled(); }
|
||||
#endif // ENABLE_SLOPE_RENDERING
|
||||
|
||||
void set_current_canvas_as_dirty();
|
||||
GLCanvas3D* get_current_canvas3D();
|
||||
#if ENABLE_NON_STATIC_CANVAS_MANAGER
|
||||
void unbind_canvas_event_handlers();
|
||||
#endif // ENABLE_NON_STATIC_CANVAS_MANAGER
|
||||
|
||||
bool init_view_toolbar();
|
||||
|
||||
|
@ -2054,12 +2069,26 @@ Plater::priv::priv(Plater *q, MainFrame *main_frame)
|
|||
sla_print.set_status_callback(statuscb);
|
||||
this->q->Bind(EVT_SLICING_UPDATE, &priv::on_slicing_update, this);
|
||||
|
||||
#if ENABLE_NON_STATIC_CANVAS_MANAGER
|
||||
view3D = new View3D(q, &model, config, &background_process);
|
||||
#if ENABLE_GCODE_VIEWER
|
||||
preview = new Preview(q, &model, config, &background_process, &gcode_preview_data, &gcode_result, [this]() { schedule_background_process(); });
|
||||
#else
|
||||
preview = new Preview(q, &model, config, &background_process, &gcode_preview_data, [this]() { schedule_background_process(); });
|
||||
#endif // ENABLE_GCODE_VIEWER
|
||||
|
||||
#ifdef __APPLE__
|
||||
// set default view_toolbar icons size equal to GLGizmosManager::Default_Icons_Size
|
||||
view_toolbar.set_icons_size(GLGizmosManager::Default_Icons_Size);
|
||||
#endif // __APPLE__
|
||||
#else
|
||||
view3D = new View3D(q, bed, camera, view_toolbar, &model, config, &background_process);
|
||||
#if ENABLE_GCODE_VIEWER
|
||||
preview = new Preview(q, bed, camera, view_toolbar, &model, config, &background_process, &gcode_preview_data, &gcode_result, [this]() { schedule_background_process(); });
|
||||
#else
|
||||
preview = new Preview(q, bed, camera, view_toolbar, &model, config, &background_process, &gcode_preview_data, [this](){ schedule_background_process(); });
|
||||
preview = new Preview(q, bed, camera, view_toolbar, &model, config, &background_process, &gcode_preview_data, [this]() { schedule_background_process(); });
|
||||
#endif // ENABLE_GCODE_VIEWER
|
||||
#endif // ENABLE_NON_STATIC_CANVAS_MANAGER
|
||||
|
||||
panels.push_back(view3D);
|
||||
panels.push_back(preview);
|
||||
|
@ -2159,7 +2188,9 @@ Plater::priv::priv(Plater *q, MainFrame *main_frame)
|
|||
// Drop target:
|
||||
q->SetDropTarget(new PlaterDropTarget(q)); // if my understanding is right, wxWindow takes the owenership
|
||||
|
||||
#if !ENABLE_NON_STATIC_CANVAS_MANAGER
|
||||
update_ui_from_settings();
|
||||
#endif // !ENABLE_NON_STATIC_CANVAS_MANAGER
|
||||
q->Layout();
|
||||
|
||||
set_current_panel(view3D);
|
||||
|
@ -4058,6 +4089,17 @@ GLCanvas3D* Plater::priv::get_current_canvas3D()
|
|||
return (current_panel == view3D) ? view3D->get_canvas3d() : ((current_panel == preview) ? preview->get_canvas3d() : nullptr);
|
||||
}
|
||||
|
||||
#if ENABLE_NON_STATIC_CANVAS_MANAGER
|
||||
void Plater::priv::unbind_canvas_event_handlers()
|
||||
{
|
||||
if (view3D != nullptr)
|
||||
view3D->get_canvas3d()->unbind_event_handlers();
|
||||
|
||||
if (preview != nullptr)
|
||||
preview->get_canvas3d()->unbind_event_handlers();
|
||||
}
|
||||
#endif // ENABLE_NON_STATIC_CANVAS_MANAGER
|
||||
|
||||
bool Plater::priv::init_view_toolbar()
|
||||
{
|
||||
if (view_toolbar.get_items_count() > 0)
|
||||
|
@ -4528,7 +4570,8 @@ void Sidebar::set_btn_label(const ActionButtonType btn_type, const wxString& lab
|
|||
// Plater / Public
|
||||
|
||||
Plater::Plater(wxWindow *parent, MainFrame *main_frame)
|
||||
: wxPanel(parent), p(new priv(this, main_frame))
|
||||
: wxPanel(parent)
|
||||
, p(new priv(this, main_frame))
|
||||
{
|
||||
// Initialization performed in the private c-tor
|
||||
}
|
||||
|
@ -4652,6 +4695,13 @@ bool Plater::is_view3D_shown() const { return p->is_view3D_shown(); }
|
|||
bool Plater::are_view3D_labels_shown() const { return p->are_view3D_labels_shown(); }
|
||||
void Plater::show_view3D_labels(bool show) { p->show_view3D_labels(show); }
|
||||
|
||||
#if ENABLE_SLOPE_RENDERING
|
||||
bool Plater::is_view3D_slope_shown() const { return p->is_view3D_slope_shown(); }
|
||||
void Plater::show_view3D_slope(bool show) { p->show_view3D_slope(show); }
|
||||
|
||||
bool Plater::is_view3D_layers_editing_enabled() const { return p->is_view3D_layers_editing_enabled(); }
|
||||
#endif // ENABLE_SLOPE_RENDERING
|
||||
|
||||
void Plater::select_all() { p->select_all(); }
|
||||
void Plater::deselect_all() { p->deselect_all(); }
|
||||
|
||||
|
@ -5459,6 +5509,13 @@ void Plater::set_current_canvas_as_dirty()
|
|||
p->set_current_canvas_as_dirty();
|
||||
}
|
||||
|
||||
#if ENABLE_NON_STATIC_CANVAS_MANAGER
|
||||
void Plater::unbind_canvas_event_handlers()
|
||||
{
|
||||
p->unbind_canvas_event_handlers();
|
||||
}
|
||||
#endif // ENABLE_NON_STATIC_CANVAS_MANAGER
|
||||
|
||||
PrinterTechnology Plater::printer_technology() const
|
||||
{
|
||||
return p->printer_technology;
|
||||
|
@ -5592,6 +5649,28 @@ Camera& Plater::get_camera()
|
|||
return p->camera;
|
||||
}
|
||||
|
||||
#if ENABLE_NON_STATIC_CANVAS_MANAGER
|
||||
const Bed3D& Plater::get_bed() const
|
||||
{
|
||||
return p->bed;
|
||||
}
|
||||
|
||||
Bed3D& Plater::get_bed()
|
||||
{
|
||||
return p->bed;
|
||||
}
|
||||
|
||||
const GLToolbar& Plater::get_view_toolbar() const
|
||||
{
|
||||
return p->view_toolbar;
|
||||
}
|
||||
|
||||
GLToolbar& Plater::get_view_toolbar()
|
||||
{
|
||||
return p->view_toolbar;
|
||||
}
|
||||
#endif // ENABLE_NON_STATIC_CANVAS_MANAGER
|
||||
|
||||
const Mouse3DController& Plater::get_mouse3d_controller() const
|
||||
{
|
||||
return p->mouse3d_controller;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue