mirror of
https://git.mirrors.martin98.com/https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-26 00:24:24 +08:00
fix a gcode preview compatibility issue
This commit is contained in:
parent
0355d0297e
commit
3af2c20bb2
@ -1150,7 +1150,7 @@ ConfigSubstitutions ConfigBase::load_from_gcode_file(const std::string &file, Fo
|
|||||||
bool end_found = false;
|
bool end_found = false;
|
||||||
std::string line;
|
std::string line;
|
||||||
while (std::getline(ifs, line))
|
while (std::getline(ifs, line))
|
||||||
if (line == "; CONFIG_BLOCK_START") {
|
if (line.rfind("; CONFIG_BLOCK_START",0)==0) {
|
||||||
begin_found = true;
|
begin_found = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1160,7 +1160,7 @@ ConfigSubstitutions ConfigBase::load_from_gcode_file(const std::string &file, Fo
|
|||||||
}
|
}
|
||||||
std::string key, value;
|
std::string key, value;
|
||||||
while (std::getline(ifs, line)) {
|
while (std::getline(ifs, line)) {
|
||||||
if (line == "; CONFIG_BLOCK_END") {
|
if (line.rfind("; CONFIG_BLOCK_END",0)==0) {
|
||||||
end_found = true;
|
end_found = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user