mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-14 02:07:54 -06:00
Fix random crash when opening 3mf files that have bed size different than current (#7955)
* Fix bed raycast id * Fix bed raycaster UAF crash due to bed resizing
This commit is contained in:
parent
b488fdecec
commit
a3de7cf0bd
5 changed files with 5 additions and 5 deletions
|
@ -6767,7 +6767,7 @@ void GLCanvas3D::_picking_pass()
|
|||
case SceneRaycaster::EType::Bed:
|
||||
{
|
||||
// BBS: add plate picking logic
|
||||
int plate_hover_id = PartPlate::PLATE_BASE_ID - hit.raycaster_id;
|
||||
int plate_hover_id = hit.raycaster_id;
|
||||
if (plate_hover_id >= 0 && plate_hover_id < PartPlateList::MAX_PLATES_COUNT * PartPlate::GRABBER_COUNT) {
|
||||
wxGetApp().plater()->get_partplate_list().set_hover_id(plate_hover_id);
|
||||
m_hover_plate_idxs.emplace_back(plate_hover_id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue