Performance optimizations and bugfix

This commit is contained in:
tamasmeszaros committed 2020-09-10 14:03:30 +02:00
1 parent 3b7ea5587e
commit d527122046
2 files changed
+16 -3

No files matched your search

+2 -1
View File
@@ -13,7 +13,8 @@ namespace Slic3r { namespace GUI {
void RotoptimizeJob::process()
{
int obj_idx = m_plater->get_selected_object_idx();
if (obj_idx < 0) { return; }
if (obj_idx < 0 || m_plater->sla_print().objects().size() <= obj_idx)
return;
ModelObject *o = m_plater->model().objects[size_t(obj_idx)];
const SLAPrintObject *po = m_plater->sla_print().objects()[size_t(obj_idx)];