mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 08:47:52 -06:00
Fixed conflicts after merge with master
This commit is contained in:
commit
aa49575e0f
22 changed files with 8 additions and 844 deletions
|
@ -27,51 +27,27 @@
|
|||
namespace Slic3r {
|
||||
namespace GUI {
|
||||
|
||||
#if ENABLE_NON_STATIC_CANVAS_MANAGER
|
||||
View3D::View3D(wxWindow* parent, Model* model, DynamicPrintConfig* config, BackgroundSlicingProcess* process)
|
||||
: m_canvas_widget(nullptr)
|
||||
, m_canvas(nullptr)
|
||||
{
|
||||
init(parent, model, config, process);
|
||||
}
|
||||
#else
|
||||
View3D::View3D(wxWindow* parent, Bed3D& bed, Camera& camera, GLToolbar& view_toolbar, Model* model, DynamicPrintConfig* config, BackgroundSlicingProcess* process)
|
||||
: m_canvas_widget(nullptr)
|
||||
, m_canvas(nullptr)
|
||||
{
|
||||
init(parent, bed, camera, view_toolbar, model, config, process);
|
||||
}
|
||||
#endif // ENABLE_NON_STATIC_CANVAS_MANAGER
|
||||
|
||||
View3D::~View3D()
|
||||
{
|
||||
#if ENABLE_NON_STATIC_CANVAS_MANAGER
|
||||
if (m_canvas != nullptr)
|
||||
delete m_canvas;
|
||||
#endif // ENABLE_NON_STATIC_CANVAS_MANAGER
|
||||
|
||||
if (m_canvas_widget != nullptr)
|
||||
{
|
||||
#if !ENABLE_NON_STATIC_CANVAS_MANAGER
|
||||
_3DScene::remove_canvas(m_canvas_widget);
|
||||
#endif // !ENABLE_NON_STATIC_CANVAS_MANAGER
|
||||
delete m_canvas_widget;
|
||||
#if !ENABLE_NON_STATIC_CANVAS_MANAGER
|
||||
m_canvas = nullptr;
|
||||
#endif // !ENABLE_NON_STATIC_CANVAS_MANAGER
|
||||
}
|
||||
}
|
||||
|
||||
#if ENABLE_NON_STATIC_CANVAS_MANAGER
|
||||
bool View3D::init(wxWindow* parent, Model* model, DynamicPrintConfig* config, BackgroundSlicingProcess* process)
|
||||
#else
|
||||
bool View3D::init(wxWindow* parent, Bed3D& bed, Camera& camera, GLToolbar& view_toolbar, Model* model, DynamicPrintConfig* config, BackgroundSlicingProcess* process)
|
||||
#endif // ENABLE_NON_STATIC_CANVAS_MANAGER
|
||||
{
|
||||
if (!Create(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 /* disable wxTAB_TRAVERSAL */))
|
||||
return false;
|
||||
|
||||
#if ENABLE_NON_STATIC_CANVAS_MANAGER
|
||||
m_canvas_widget = GLCanvas3DManager::create_wxglcanvas(*this);
|
||||
if (m_canvas_widget == nullptr)
|
||||
return false;
|
||||
|
@ -79,11 +55,6 @@ bool View3D::init(wxWindow* parent, Bed3D& bed, Camera& camera, GLToolbar& view_
|
|||
m_canvas = new GLCanvas3D(m_canvas_widget);
|
||||
m_canvas->set_context(wxGetApp().init_glcontext(*m_canvas_widget));
|
||||
m_canvas->bind_event_handlers();
|
||||
#else
|
||||
m_canvas_widget = GLCanvas3DManager::create_wxglcanvas(this);
|
||||
_3DScene::add_canvas(m_canvas_widget, bed, camera, view_toolbar);
|
||||
m_canvas = _3DScene::get_canvas(this->m_canvas_widget);
|
||||
#endif // ENABLE_NON_STATIC_CANVAS_MANAGER
|
||||
|
||||
m_canvas->allow_multisample(GLCanvas3DManager::can_multisample());
|
||||
// XXX: If have OpenGL
|
||||
|
@ -199,27 +170,15 @@ void View3D::render()
|
|||
m_canvas->set_as_dirty();
|
||||
}
|
||||
|
||||
#if ENABLE_NON_STATIC_CANVAS_MANAGER
|
||||
#if ENABLE_GCODE_VIEWER
|
||||
Preview::Preview(
|
||||
wxWindow* parent, Model* model, DynamicPrintConfig* config,
|
||||
BackgroundSlicingProcess* process, GCodePreviewData* gcode_preview_data, GCodeProcessor::Result* gcode_result, std::function<void()> schedule_background_process_func)
|
||||
wxWindow * parent, Model * model, DynamicPrintConfig * config,
|
||||
BackgroundSlicingProcess * process, GCodePreviewData * gcode_preview_data, GCodeProcessor::Result * gcode_result, std::function<void()> schedule_background_process_func)
|
||||
#else
|
||||
Preview::Preview(
|
||||
wxWindow* parent, Model* model, DynamicPrintConfig* config,
|
||||
BackgroundSlicingProcess* process, GCodePreviewData* gcode_preview_data, std::function<void()> schedule_background_process_func)
|
||||
#endif // ENABLE_GCODE_VIEWER
|
||||
#else
|
||||
#if ENABLE_GCODE_VIEWER
|
||||
Preview::Preview(
|
||||
wxWindow* parent, Bed3D& bed, Camera& camera, GLToolbar& view_toolbar, Model* model, DynamicPrintConfig* config,
|
||||
BackgroundSlicingProcess* process, GCodePreviewData* gcode_preview_data, GCodeProcessor::Result* gcode_result, std::function<void()> schedule_background_process_func)
|
||||
#else
|
||||
Preview::Preview(
|
||||
wxWindow* parent, Bed3D& bed, Camera& camera, GLToolbar& view_toolbar, Model* model, DynamicPrintConfig* config,
|
||||
BackgroundSlicingProcess* process, GCodePreviewData* gcode_preview_data, std::function<void()> schedule_background_process_func)
|
||||
#endif // ENABLE_GCODE_VIEWER
|
||||
#endif // ENABLE_NON_STATIC_CANVAS_MANAGER
|
||||
: m_canvas_widget(nullptr)
|
||||
, m_canvas(nullptr)
|
||||
, m_double_slider_sizer(nullptr)
|
||||
|
@ -254,11 +213,7 @@ Preview::Preview(
|
|||
, m_volumes_cleanup_required(false)
|
||||
#endif // __linux__
|
||||
{
|
||||
#if ENABLE_NON_STATIC_CANVAS_MANAGER
|
||||
if (init(parent, model))
|
||||
#else
|
||||
if (init(parent, bed, camera, view_toolbar, model))
|
||||
#endif // ENABLE_NON_STATIC_CANVAS_MANAGER
|
||||
{
|
||||
#if !ENABLE_GCODE_VIEWER
|
||||
show_hide_ui_elements("none");
|
||||
|
@ -267,16 +222,11 @@ Preview::Preview(
|
|||
}
|
||||
}
|
||||
|
||||
#if ENABLE_NON_STATIC_CANVAS_MANAGER
|
||||
bool Preview::init(wxWindow* parent, Model* model)
|
||||
#else
|
||||
bool Preview::init(wxWindow* parent, Bed3D& bed, Camera& camera, GLToolbar& view_toolbar, Model* model)
|
||||
#endif // ENABLE_NON_STATIC_CANVAS_MANAGER
|
||||
{
|
||||
if (!Create(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 /* disable wxTAB_TRAVERSAL */))
|
||||
return false;
|
||||
|
||||
#if ENABLE_NON_STATIC_CANVAS_MANAGER
|
||||
m_canvas_widget = GLCanvas3DManager::create_wxglcanvas(*this);
|
||||
if (m_canvas_widget == nullptr)
|
||||
return false;
|
||||
|
@ -284,11 +234,6 @@ bool Preview::init(wxWindow* parent, Bed3D& bed, Camera& camera, GLToolbar& view
|
|||
m_canvas = new GLCanvas3D(m_canvas_widget);
|
||||
m_canvas->set_context(wxGetApp().init_glcontext(*m_canvas_widget));
|
||||
m_canvas->bind_event_handlers();
|
||||
#else
|
||||
m_canvas_widget = GLCanvas3DManager::create_wxglcanvas(this);
|
||||
_3DScene::add_canvas(m_canvas_widget, bed, camera, view_toolbar);
|
||||
m_canvas = _3DScene::get_canvas(this->m_canvas_widget);
|
||||
#endif // ENABLE_NON_STATIC_CANVAS_MANAGER
|
||||
m_canvas->allow_multisample(GLCanvas3DManager::can_multisample());
|
||||
m_canvas->set_config(m_config);
|
||||
m_canvas->set_model(model);
|
||||
|
@ -435,19 +380,11 @@ Preview::~Preview()
|
|||
{
|
||||
unbind_event_handlers();
|
||||
|
||||
#if ENABLE_NON_STATIC_CANVAS_MANAGER
|
||||
if (m_canvas != nullptr)
|
||||
delete m_canvas;
|
||||
#endif // ENABLE_NON_STATIC_CANVAS_MANAGER
|
||||
|
||||
if (m_canvas_widget != nullptr)
|
||||
{
|
||||
#if !ENABLE_NON_STATIC_CANVAS_MANAGER
|
||||
_3DScene::remove_canvas(m_canvas_widget);
|
||||
#endif // ENABLE_NON_STATIC_CANVAS_MANAGER
|
||||
delete m_canvas_widget;
|
||||
m_canvas = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
void Preview::set_as_dirty()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue