mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-13 01:37:53 -06:00
Fix of G-code Viewer not loading .gco files #5536
".gcode", ".gco", ".g" and ".ngc" were considered to be G-code file extensions by the G-code import / export file dialogs, but not by various other functions. Now the G-code extension is tested by a single function is_gcode_file(string).
This commit is contained in:
parent
b93c2aea44
commit
fb29325b14
7 changed files with 17 additions and 19 deletions
|
@ -4847,9 +4847,7 @@ void Plater::load_gcode()
|
|||
|
||||
void Plater::load_gcode(const wxString& filename)
|
||||
{
|
||||
if (filename.empty() ||
|
||||
(!filename.Lower().EndsWith(".gcode") && !filename.Lower().EndsWith(".g")) ||
|
||||
m_last_loaded_gcode == filename)
|
||||
if (! is_gcode_file(into_u8(filename)) || m_last_loaded_gcode == filename)
|
||||
return;
|
||||
|
||||
m_last_loaded_gcode = filename;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue