FIX: The print_z of some layers is incorrect after slicing

jira: STUDIO-11989
Change-Id: Ia0488d8270a7880d3f019d757cde7ce2f591713d
(cherry picked from commit 9bd47ef3e59b5518cd049182890c1d557c69b710)
This commit is contained in:
zhimin.zeng 2025-05-22 17:25:25 +08:00 committed by Noisyfox
parent 9b68aef078
commit fa8280f065

View file

@ -2754,7 +2754,7 @@ bool GCodeProcessor::get_last_z_from_gcode(const std::string& gcode_str, double&
line_str.erase(line_str.find_last_not_of(" ") + 1);
//command which may have z movement
if (line_str.size() > 5 && (line_str.find("G0 ") == 0
if (line_str.size() > 4 && (line_str.find("G0 ") == 0
|| line_str.find("G1 ") == 0
|| line_str.find("G2 ") == 0
|| line_str.find("G3 ") == 0))