added method: static GUI::GLCanvas3D* _3DScene::get_canvas(wxGLCanvas* canvas)
This commit is contained in:
parent
3bccb3b97c
commit
e201c5123c
4 changed files with 23 additions and 8 deletions
|
@ -1895,12 +1895,17 @@ bool _3DScene::move_volume_down(wxGLCanvas* canvas, unsigned int id)
|
||||||
return s_canvas_mgr.move_volume_down(canvas, id);
|
return s_canvas_mgr.move_volume_down(canvas, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !ENABLE_EXTENDED_SELECTION
|
#if ENABLE_EXTENDED_SELECTION
|
||||||
|
GUI::GLCanvas3D* _3DScene::get_canvas(wxGLCanvas* canvas)
|
||||||
|
{
|
||||||
|
return s_canvas_mgr.get_canvas(canvas);
|
||||||
|
}
|
||||||
|
#else
|
||||||
void _3DScene::set_objects_selections(wxGLCanvas* canvas, const std::vector<int>& selections)
|
void _3DScene::set_objects_selections(wxGLCanvas* canvas, const std::vector<int>& selections)
|
||||||
{
|
{
|
||||||
s_canvas_mgr.set_objects_selections(canvas, selections);
|
s_canvas_mgr.set_objects_selections(canvas, selections);
|
||||||
}
|
}
|
||||||
#endif // !ENABLE_EXTENDED_SELECTION
|
#endif // ENABLE_EXTENDED_SELECTION
|
||||||
|
|
||||||
void _3DScene::set_config(wxGLCanvas* canvas, DynamicPrintConfig* config)
|
void _3DScene::set_config(wxGLCanvas* canvas, DynamicPrintConfig* config)
|
||||||
{
|
{
|
||||||
|
|
|
@ -528,9 +528,11 @@ public:
|
||||||
static bool move_volume_up(wxGLCanvas* canvas, unsigned int id);
|
static bool move_volume_up(wxGLCanvas* canvas, unsigned int id);
|
||||||
static bool move_volume_down(wxGLCanvas* canvas, unsigned int id);
|
static bool move_volume_down(wxGLCanvas* canvas, unsigned int id);
|
||||||
|
|
||||||
#if !ENABLE_EXTENDED_SELECTION
|
#if ENABLE_EXTENDED_SELECTION
|
||||||
|
static GUI::GLCanvas3D* get_canvas(wxGLCanvas* canvas);
|
||||||
|
#else
|
||||||
static void set_objects_selections(wxGLCanvas* canvas, const std::vector<int>& selections);
|
static void set_objects_selections(wxGLCanvas* canvas, const std::vector<int>& selections);
|
||||||
#endif // !ENABLE_EXTENDED_SELECTION
|
#endif // ENABLE_EXTENDED_SELECTION
|
||||||
|
|
||||||
static void set_config(wxGLCanvas* canvas, DynamicPrintConfig* config);
|
static void set_config(wxGLCanvas* canvas, DynamicPrintConfig* config);
|
||||||
static void set_print(wxGLCanvas* canvas, Print* print);
|
static void set_print(wxGLCanvas* canvas, Print* print);
|
||||||
|
|
|
@ -287,14 +287,20 @@ bool GLCanvas3DManager::move_volume_down(wxGLCanvas* canvas, unsigned int id)
|
||||||
return (it != m_canvases.end()) ? it->second->move_volume_down(id) : false;
|
return (it != m_canvases.end()) ? it->second->move_volume_down(id) : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !ENABLE_EXTENDED_SELECTION
|
#if ENABLE_EXTENDED_SELECTION
|
||||||
|
GLCanvas3D* GLCanvas3DManager::get_canvas(wxGLCanvas* canvas)
|
||||||
|
{
|
||||||
|
CanvasesMap::const_iterator it = _get_canvas(canvas);
|
||||||
|
return (it != m_canvases.end()) ? it->second : nullptr;
|
||||||
|
}
|
||||||
|
#else
|
||||||
void GLCanvas3DManager::set_objects_selections(wxGLCanvas* canvas, const std::vector<int>& selections)
|
void GLCanvas3DManager::set_objects_selections(wxGLCanvas* canvas, const std::vector<int>& selections)
|
||||||
{
|
{
|
||||||
CanvasesMap::iterator it = _get_canvas(canvas);
|
CanvasesMap::iterator it = _get_canvas(canvas);
|
||||||
if (it != m_canvases.end())
|
if (it != m_canvases.end())
|
||||||
it->second->set_objects_selections(selections);
|
it->second->set_objects_selections(selections);
|
||||||
}
|
}
|
||||||
#endif // !ENABLE_EXTENDED_SELECTION
|
#endif // ENABLE_EXTENDED_SELECTION
|
||||||
|
|
||||||
void GLCanvas3DManager::set_config(wxGLCanvas* canvas, DynamicPrintConfig* config)
|
void GLCanvas3DManager::set_config(wxGLCanvas* canvas, DynamicPrintConfig* config)
|
||||||
{
|
{
|
||||||
|
|
|
@ -96,9 +96,11 @@ public:
|
||||||
bool move_volume_up(wxGLCanvas* canvas, unsigned int id);
|
bool move_volume_up(wxGLCanvas* canvas, unsigned int id);
|
||||||
bool move_volume_down(wxGLCanvas* canvas, unsigned int id);
|
bool move_volume_down(wxGLCanvas* canvas, unsigned int id);
|
||||||
|
|
||||||
#if !ENABLE_EXTENDED_SELECTION
|
#if ENABLE_EXTENDED_SELECTION
|
||||||
|
GLCanvas3D* get_canvas(wxGLCanvas* canvas);
|
||||||
|
#else
|
||||||
void set_objects_selections(wxGLCanvas* canvas, const std::vector<int>& selections);
|
void set_objects_selections(wxGLCanvas* canvas, const std::vector<int>& selections);
|
||||||
#endif // !ENABLE_EXTENDED_SELECTION
|
#endif // ENABLE_EXTENDED_SELECTION
|
||||||
|
|
||||||
void set_config(wxGLCanvas* canvas, DynamicPrintConfig* config);
|
void set_config(wxGLCanvas* canvas, DynamicPrintConfig* config);
|
||||||
void set_print(wxGLCanvas* canvas, Print* print);
|
void set_print(wxGLCanvas* canvas, Print* print);
|
||||||
|
|
Loading…
Add table
Reference in a new issue