diff --git a/src/GUI/Plater/Plate2D.cpp b/src/GUI/Plater/Plate2D.cpp index e2a4162bf..36997560e 100644 --- a/src/GUI/Plater/Plate2D.cpp +++ b/src/GUI/Plater/Plate2D.cpp @@ -97,6 +97,10 @@ void Plate2D::repaint(wxPaintEvent& e) { } +void Plate2D::clean_instance_thumbnails() { + for (auto& obj : this->objects) { + obj.instance_thumbnails.clear(); + } } void Plate2D::mouse_drag(wxMouseEvent& e) { diff --git a/src/GUI/Plater/Plate2D.hpp b/src/GUI/Plater/Plate2D.hpp index 1db726a11..42ec6f786 100644 --- a/src/GUI/Plater/Plate2D.hpp +++ b/src/GUI/Plater/Plate2D.hpp @@ -119,6 +119,9 @@ private: return this->point_to_model_units(pt.x, pt.y); } + /// Remove all instance thumbnails. + void clean_instance_thumbnails(); + }; } } // Namespace Slic3r::GUI