#6730 - GCodeViewer -> Fixed crash when importing gcode files generated by PrusaSlicer and edited by user or 3rd part post processors by appending new lines after the config section. Show instead the same error dialog as when trying to import the config into PrusaSlicer from the same gcode file
This commit is contained in:
parent
368cfedbc7
commit
7c01ddf996
@ -4898,7 +4898,15 @@ void Plater::load_gcode(const wxString& filename)
|
||||
// process gcode
|
||||
GCodeProcessor processor;
|
||||
processor.enable_producers(true);
|
||||
processor.process_file(filename.ToUTF8().data(), false);
|
||||
try
|
||||
{
|
||||
processor.process_file(filename.ToUTF8().data(), false);
|
||||
}
|
||||
catch (const std::exception& ex)
|
||||
{
|
||||
show_error(this, ex.what());
|
||||
return;
|
||||
}
|
||||
p->gcode_result = std::move(processor.extract_result());
|
||||
|
||||
// show results
|
||||
|
Loading…
Reference in New Issue
Block a user