diff options
Diffstat (limited to 'xs/src')
-rw-r--r-- | xs/src/slic3r/GUI/3DScene.cpp | 5 | ||||
-rw-r--r-- | xs/src/slic3r/GUI/3DScene.hpp | 1 | ||||
-rw-r--r-- | xs/src/slic3r/GUI/GLCanvas3D.cpp | 5 | ||||
-rw-r--r-- | xs/src/slic3r/GUI/GLCanvas3D.hpp | 1 | ||||
-rw-r--r-- | xs/src/slic3r/GUI/GLCanvas3DManager.cpp | 7 | ||||
-rw-r--r-- | xs/src/slic3r/GUI/GLCanvas3DManager.hpp | 1 |
6 files changed, 20 insertions, 0 deletions
diff --git a/xs/src/slic3r/GUI/3DScene.cpp b/xs/src/slic3r/GUI/3DScene.cpp index 1879b3082..a2a310f3c 100644 --- a/xs/src/slic3r/GUI/3DScene.cpp +++ b/xs/src/slic3r/GUI/3DScene.cpp @@ -1758,6 +1758,11 @@ void _3DScene::set_active(wxGLCanvas* canvas, bool active) s_canvas_mgr.set_active(canvas, active); } +void _3DScene::set_as_dirty(wxGLCanvas* canvas) +{ + s_canvas_mgr.set_as_dirty(canvas); +} + unsigned int _3DScene::get_volumes_count(wxGLCanvas* canvas) { return s_canvas_mgr.get_volumes_count(canvas); diff --git a/xs/src/slic3r/GUI/3DScene.hpp b/xs/src/slic3r/GUI/3DScene.hpp index c6a166397..c317dba24 100644 --- a/xs/src/slic3r/GUI/3DScene.hpp +++ b/xs/src/slic3r/GUI/3DScene.hpp @@ -517,6 +517,7 @@ public: static bool init(wxGLCanvas* canvas); static void set_active(wxGLCanvas* canvas, bool active); + static void set_as_dirty(wxGLCanvas* canvas); static unsigned int get_volumes_count(wxGLCanvas* canvas); static void reset_volumes(wxGLCanvas* canvas); diff --git a/xs/src/slic3r/GUI/GLCanvas3D.cpp b/xs/src/slic3r/GUI/GLCanvas3D.cpp index d3153bdb4..6f23af5a3 100644 --- a/xs/src/slic3r/GUI/GLCanvas3D.cpp +++ b/xs/src/slic3r/GUI/GLCanvas3D.cpp @@ -1536,6 +1536,11 @@ void GLCanvas3D::set_active(bool active) m_active = active; } +void GLCanvas3D::set_as_dirty() +{ + m_dirty = true; +} + unsigned int GLCanvas3D::get_volumes_count() const { return (unsigned int)m_volumes.volumes.size(); diff --git a/xs/src/slic3r/GUI/GLCanvas3D.hpp b/xs/src/slic3r/GUI/GLCanvas3D.hpp index c503d1845..18011f497 100644 --- a/xs/src/slic3r/GUI/GLCanvas3D.hpp +++ b/xs/src/slic3r/GUI/GLCanvas3D.hpp @@ -452,6 +452,7 @@ public: bool set_current(); void set_active(bool active); + void set_as_dirty(); unsigned int get_volumes_count() const; void reset_volumes(); diff --git a/xs/src/slic3r/GUI/GLCanvas3DManager.cpp b/xs/src/slic3r/GUI/GLCanvas3DManager.cpp index bdca73854..81efe4408 100644 --- a/xs/src/slic3r/GUI/GLCanvas3DManager.cpp +++ b/xs/src/slic3r/GUI/GLCanvas3DManager.cpp @@ -219,6 +219,13 @@ void GLCanvas3DManager::set_active(wxGLCanvas* canvas, bool active) it->second->set_active(active); } +void GLCanvas3DManager::set_as_dirty(wxGLCanvas* canvas) +{ + CanvasesMap::iterator it = _get_canvas(canvas); + if (it != m_canvases.end()) + it->second->set_as_dirty(); +} + unsigned int GLCanvas3DManager::get_volumes_count(wxGLCanvas* canvas) const { CanvasesMap::const_iterator it = _get_canvas(canvas); diff --git a/xs/src/slic3r/GUI/GLCanvas3DManager.hpp b/xs/src/slic3r/GUI/GLCanvas3DManager.hpp index 3092925d3..8726eb0b1 100644 --- a/xs/src/slic3r/GUI/GLCanvas3DManager.hpp +++ b/xs/src/slic3r/GUI/GLCanvas3DManager.hpp @@ -70,6 +70,7 @@ public: bool init(wxGLCanvas* canvas); void set_active(wxGLCanvas* canvas, bool active); + void set_as_dirty(wxGLCanvas* canvas); unsigned int get_volumes_count(wxGLCanvas* canvas) const; void reset_volumes(wxGLCanvas* canvas); |