mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-05-16 08:12:39 -07: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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user