mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-17 02:22:17 +00:00
tweak generator info and use local time stamp for better readability
This commit is contained in:
@@ -1193,6 +1193,9 @@ ConfigSubstitutions ConfigBase::load_from_gcode_file(const std::string &file, Fo
|
||||
std::string bambuslicer_gcode_header = "; ";
|
||||
bambuslicer_gcode_header += SLIC3R_APP_NAME;
|
||||
|
||||
std::string orcaslicer_gcode_header = std::string("; generated by ");
|
||||
orcaslicer_gcode_header += Slic3r::header_slic3r_generated();
|
||||
|
||||
std::string header;
|
||||
bool header_found = false;
|
||||
while (std::getline(ifs, header)) {
|
||||
@@ -1202,7 +1205,8 @@ ConfigSubstitutions ConfigBase::load_from_gcode_file(const std::string &file, Fo
|
||||
line_c = skip_word(line_c);
|
||||
line_c = skip_whitespaces(line_c);
|
||||
// BBS
|
||||
if (strncmp(bambuslicer_gcode_header.c_str(), line_c, strlen(bambuslicer_gcode_header.c_str())) == 0) {
|
||||
if (strncmp(bambuslicer_gcode_header.c_str(), line_c, strlen(bambuslicer_gcode_header.c_str())) == 0 ||
|
||||
strncmp(orcaslicer_gcode_header.c_str(), line_c, strlen(orcaslicer_gcode_header.c_str())) == 0) {
|
||||
header_found = true;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user