mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-12 01:07:57 -06:00
Fix crash when loading gcode file twice (#7217)
* Fix ASAN use-after-free error when loading 3mf file with gcode by drag-and-drop * Fix crash when loading gcode file twice
This commit is contained in:
parent
88ca0bc5b9
commit
2348928b25
1 changed files with 4 additions and 2 deletions
|
@ -10128,6 +10128,10 @@ void Plater::load_gcode(const wxString& filename)
|
||||||
set_project_filename(filename);
|
set_project_filename(filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Orca: Fix crash when loading gcode file multiple times
|
||||||
|
if (m_only_gcode) {
|
||||||
|
p->view3D->get_canvas3d()->remove_raycasters_for_picking(SceneRaycaster::EType::Bed);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Plater::reload_gcode_from_disk()
|
void Plater::reload_gcode_from_disk()
|
||||||
|
@ -12347,7 +12351,6 @@ void Plater::reslice()
|
||||||
// Post the "complete" callback message, so that it will slice the next plate soon
|
// Post the "complete" callback message, so that it will slice the next plate soon
|
||||||
wxQueueEvent(this, evt.Clone());
|
wxQueueEvent(this, evt.Clone());
|
||||||
p->m_is_slicing = true;
|
p->m_is_slicing = true;
|
||||||
this->SetDropTarget(nullptr);
|
|
||||||
if (p->m_cur_slice_plate == 0)
|
if (p->m_cur_slice_plate == 0)
|
||||||
reset_gcode_toolpaths();
|
reset_gcode_toolpaths();
|
||||||
return;
|
return;
|
||||||
|
@ -12355,7 +12358,6 @@ void Plater::reslice()
|
||||||
|
|
||||||
if (result) {
|
if (result) {
|
||||||
p->m_is_slicing = true;
|
p->m_is_slicing = true;
|
||||||
this->SetDropTarget(nullptr);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool clean_gcode_toolpaths = true;
|
bool clean_gcode_toolpaths = true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue