mirror of
https://git.mirrors.martin98.com/https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-14 23:06:11 +08:00
#3430 - Fixed crash when right-clicking on wipe tower
This commit is contained in:
parent
220e2dbfec
commit
a2ff94515f
@ -4098,7 +4098,11 @@ bool Plater::priv::can_reload_from_disk() const
|
|||||||
const GLVolume* v = selection.get_volume(idx);
|
const GLVolume* v = selection.get_volume(idx);
|
||||||
int v_idx = v->volume_idx();
|
int v_idx = v->volume_idx();
|
||||||
if (v_idx >= 0)
|
if (v_idx >= 0)
|
||||||
selected_volumes.push_back({ v->object_idx(), v_idx });
|
{
|
||||||
|
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());
|
std::sort(selected_volumes.begin(), selected_volumes.end());
|
||||||
selected_volumes.erase(std::unique(selected_volumes.begin(), selected_volumes.end()), selected_volumes.end());
|
selected_volumes.erase(std::unique(selected_volumes.begin(), selected_volumes.end()), selected_volumes.end());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user