mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 18:12:10 +00: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:
@@ -522,6 +522,12 @@ bool is_idx_file(const boost::filesystem::directory_entry &dir_entry)
|
||||
return is_plain_file(dir_entry) && strcasecmp(dir_entry.path().extension().string().c_str(), ".idx") == 0;
|
||||
}
|
||||
|
||||
bool is_gcode_file(const std::string &path)
|
||||
{
|
||||
return boost::iends_with(path, ".gcode") || boost::iends_with(path, ".gco") ||
|
||||
boost::iends_with(path, ".g") || boost::iends_with(path, ".ngc");
|
||||
}
|
||||
|
||||
} // namespace Slic3r
|
||||
|
||||
#ifdef WIN32
|
||||
|
||||
Reference in New Issue
Block a user