mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57:53 -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);
|
||||
}
|
||||
|
||||
// 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()
|
||||
|
@ -12347,7 +12351,6 @@ void Plater::reslice()
|
|||
// Post the "complete" callback message, so that it will slice the next plate soon
|
||||
wxQueueEvent(this, evt.Clone());
|
||||
p->m_is_slicing = true;
|
||||
this->SetDropTarget(nullptr);
|
||||
if (p->m_cur_slice_plate == 0)
|
||||
reset_gcode_toolpaths();
|
||||
return;
|
||||
|
@ -12355,7 +12358,6 @@ void Plater::reslice()
|
|||
|
||||
if (result) {
|
||||
p->m_is_slicing = true;
|
||||
this->SetDropTarget(nullptr);
|
||||
}
|
||||
|
||||
bool clean_gcode_toolpaths = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue