mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 08:47:52 -06:00
Bed and Axes classes moved from GLCanva3d to Plater to have a unique instance of them shared by all views
This commit is contained in:
parent
94c529a118
commit
75df722fee
10 changed files with 821 additions and 1 deletions
|
@ -89,6 +89,14 @@ bool View3D::init(wxWindow* parent, Model* model, DynamicPrintConfig* config, Ba
|
|||
return true;
|
||||
}
|
||||
|
||||
#if ENABLE_UNIQUE_BED
|
||||
void View3D::set_bed(Bed3D* bed)
|
||||
{
|
||||
if (m_canvas != nullptr)
|
||||
m_canvas->set_bed(bed);
|
||||
}
|
||||
#endif // ENABLE_UNIQUE_BED
|
||||
|
||||
void View3D::set_view_toolbar(GLToolbar* toolbar)
|
||||
{
|
||||
if (m_canvas != nullptr)
|
||||
|
@ -101,11 +109,19 @@ void View3D::set_as_dirty()
|
|||
m_canvas->set_as_dirty();
|
||||
}
|
||||
|
||||
#if ENABLE_UNIQUE_BED
|
||||
void View3D::bed_shape_changed()
|
||||
{
|
||||
if (m_canvas != nullptr)
|
||||
m_canvas->bed_shape_changed();
|
||||
}
|
||||
#else
|
||||
void View3D::set_bed_shape(const Pointfs& shape)
|
||||
{
|
||||
if (m_canvas != nullptr)
|
||||
m_canvas->set_bed_shape(shape);
|
||||
}
|
||||
#endif // ENABLE_UNIQUE_BED
|
||||
|
||||
void View3D::select_view(const std::string& direction)
|
||||
{
|
||||
|
@ -337,6 +353,14 @@ Preview::~Preview()
|
|||
}
|
||||
}
|
||||
|
||||
#if ENABLE_UNIQUE_BED
|
||||
void Preview::set_bed(Bed3D* bed)
|
||||
{
|
||||
if (m_canvas != nullptr)
|
||||
m_canvas->set_bed(bed);
|
||||
}
|
||||
#endif // ENABLE_UNIQUE_BED
|
||||
|
||||
void Preview::set_view_toolbar(GLToolbar* toolbar)
|
||||
{
|
||||
if (m_canvas != nullptr)
|
||||
|
@ -368,10 +392,18 @@ void Preview::set_enabled(bool enabled)
|
|||
m_enabled = enabled;
|
||||
}
|
||||
|
||||
void Preview::set_bed_shape(const Pointfs& shape)
|
||||
#if ENABLE_UNIQUE_BED
|
||||
void Preview::bed_shape_changed()
|
||||
{
|
||||
if (m_canvas != nullptr)
|
||||
m_canvas->bed_shape_changed();
|
||||
}
|
||||
#else
|
||||
vvoid Preview::set_bed_shape(const Pointfs& shape)
|
||||
{
|
||||
m_canvas->set_bed_shape(shape);
|
||||
}
|
||||
#endif // ENABLE_UNIQUE_BED
|
||||
|
||||
void Preview::select_view(const std::string& direction)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue