Skip to content

Commit d7a86b3

Browse files
committed
qtplasmac: remove blank file props workaround
1 parent 77f9e7d commit d7a86b3

1 file changed

Lines changed: 1 addition & 27 deletions

File tree

share/qtvcp/screens/qtplasmac/qtplasmac_handler.py

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1553,8 +1553,6 @@ def joints_all_homed(self, obj):
15531553
ACTION.CALL_MDI_WAIT('T0 M6')
15541554
ACTION.SET_MANUAL_MODE()
15551555
self.firstHoming = True
1556-
if not self.fileOpened:
1557-
self.set_blank_gcodeprops()
15581556
self.w.gcodegraphics.updateGL()
15591557
self.w.conv_preview.updateGL()
15601558
log = _translate('HandlerClass', 'Machine homed')
@@ -1671,10 +1669,7 @@ def set_start_line(self, line):
16711669

16721670
def update_gcode_properties(self, props):
16731671
if props:
1674-
if 'qtplasmac_program_clear.ngc' in props['name']:
1675-
self.set_blank_gcodeprops()
1676-
else:
1677-
self.gcodeProps = props
1672+
self.gcodeProps = props
16781673
if props['gcode_units'] == 'in':
16791674
STATUS.emit('metric-mode-changed', False)
16801675
else:
@@ -2385,27 +2380,6 @@ def motion_type_changed(self, value):
23852380
if value == 0 and STATUS.is_mdi_mode():
23862381
ACTION.SET_MANUAL_MODE()
23872382

2388-
def set_blank_gcodeprops(self):
2389-
# a workaround for the extreme values in gcodeprops for a blank file
2390-
self.gcodeProps = {}
2391-
self.gcodeProps['name'] = 'generated from qtplasmac_program_clear.ngc'
2392-
self.gcodeProps['size'] = '35 bytes\n2 gcode lines'
2393-
self.gcodeProps['g0'] = '0.0 {}'.format(self.units)
2394-
self.gcodeProps['g1'] = '0.0 {}'.format(self.units)
2395-
self.gcodeProps['run'] = '0 Seconds'
2396-
self.gcodeProps['x'] = '0.0 to 0.0 = 0.0 {}'.format(self.units)
2397-
self.gcodeProps['y'] = '0.0 to 0.0 = 0.0 {}'.format(self.units)
2398-
self.gcodeProps['z'] = '0.0 to 0.0 = 0.0 {}'.format(self.units)
2399-
self.gcodeProps['x_zero_rxy'] = '0.0 to 0.0 = 0.0 {}'.format(self.units)
2400-
self.gcodeProps['y_zero_rxy'] = '0.0 to 0.0 = 0.0 {}'.format(self.units)
2401-
self.gcodeProps['z_zero_rxy'] = '0.0 to 0.0 = 0.0 {}'.format(self.units)
2402-
if self.units:
2403-
mach = 'Metric'
2404-
else:
2405-
mach = 'Imperial'
2406-
self.gcodeProps['machine_unit_sys'] = '{}'.format(mach)
2407-
self.gcodeProps['gcode_units'] = '{}'.format(self.units)
2408-
24092383
def wcs_rotation(self, wcs):
24102384
if wcs == 'get':
24112385
self.currentRotation = STATUS.stat.rotation_xy

0 commit comments

Comments
 (0)