From e0aa6d2f858e23d5e06746fc9cfb2979e9e599d1 Mon Sep 17 00:00:00 2001 From: Benjamin Landers Date: Fri, 22 Jun 2018 02:40:40 -0700 Subject: [PATCH] Patch menu deletion issue --- src/GUI/Plater.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/GUI/Plater.cpp b/src/GUI/Plater.cpp index 301917f46..af7688394 100644 --- a/src/GUI/Plater.cpp +++ b/src/GUI/Plater.cpp @@ -500,7 +500,8 @@ void Plater::on_model_change(bool force_autocenter) { auto* menu = this->GetFrame()->plater_select_menu; if (menu != nullptr) { - for (auto* item : menu->GetMenuItems() ) { menu->Delete(item); } + auto list = menu->GetMenuItems(); + for (auto it = list.begin();it!=list.end(); it++) { menu->Delete(*it); } for (const auto& obj : this->objects) { const auto idx {obj.identifier}; auto name {wxString(obj.name)};