Fixed crash when calling Reload from disk command after slicing on SLA printer
This commit is contained in:
parent
df3e47e093
commit
44d7ac4474
1 changed files with 6 additions and 2 deletions
|
@ -3177,9 +3177,13 @@ void Plater::priv::reload_from_disk()
|
|||
for (unsigned int idx : selected_volumes_idxs)
|
||||
{
|
||||
const GLVolume* v = selection.get_volume(idx);
|
||||
int o_idx = v->object_idx();
|
||||
int v_idx = v->volume_idx();
|
||||
selected_volumes.push_back({ o_idx, v_idx });
|
||||
if (v_idx >= 0)
|
||||
{
|
||||
int o_idx = v->object_idx();
|
||||
if ((0 <= o_idx) && (o_idx < (int)model.objects.size()))
|
||||
selected_volumes.push_back({ o_idx, v_idx });
|
||||
}
|
||||
}
|
||||
std::sort(selected_volumes.begin(), selected_volumes.end());
|
||||
selected_volumes.erase(std::unique(selected_volumes.begin(), selected_volumes.end()), selected_volumes.end());
|
||||
|
|
Loading…
Reference in a new issue