Commit d5ae027d authored by Guillaume Seguin's avatar Guillaume Seguin

Simplify some logic in gcview

parent 9a2b023c
...@@ -281,10 +281,9 @@ class GcodeModel(Model): ...@@ -281,10 +281,9 @@ class GcodeModel(Model):
for gline in layer: for gline in layer:
if not gline.is_move: if not gline.is_move:
continue continue
if gline.x is not None \ if gline.x is None and gline.y is None and gline.z is None:
or gline.y is not None \ continue
or gline.z is not None: has_movement = True
has_movement = True
current_pos = (gline.current_x, gline.current_y, gline.current_z) current_pos = (gline.current_x, gline.current_y, gline.current_z)
if not gline.extruding: if not gline.extruding:
travel_vertex_list.append(prev_pos) travel_vertex_list.append(prev_pos)
...@@ -521,10 +520,9 @@ class GcodeModelLight(Model): ...@@ -521,10 +520,9 @@ class GcodeModelLight(Model):
for gline in layer: for gline in layer:
if not gline.is_move: if not gline.is_move:
continue continue
if gline.x is not None \ if gline.x is None and gline.y is None and gline.z is None:
or gline.y is not None \ continue
or gline.z is not None: has_movement = True
has_movement = True
vertex_list.append(prev_pos) vertex_list.append(prev_pos)
current_pos = (gline.current_x, gline.current_y, gline.current_z) current_pos = (gline.current_x, gline.current_y, gline.current_z)
vertex_list.append(current_pos) vertex_list.append(current_pos)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment