Skip to content

Commit d6c225f

Browse files
committed
qtplasmac: remove redundant bounds check for laser and camera
Prevents a crash from occurring when laser or camera is used to set x0y0 before a gcode file is loaded
1 parent 3e894de commit d6c225f

2 files changed

Lines changed: 14 additions & 13 deletions

File tree

share/qtvcp/screens/qtplasmac/qtplasmac_handler.py

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
VERSION = '1.235.271'
1+
VERSION = '1.235.272'
22

33
'''
44
qtplasmac_handler.py
@@ -5077,15 +5077,12 @@ def sheet_align(self, button_state, button, offsetX, offsetY):
50775077
zAngle = 0
50785078
else:
50795079
zAngle = 0
5080-
if not self.gcodeProps:
5081-
msgList, units, xMin, yMin, xMax, yMax = self.bounds_check('align', 0, 0)
50825080
self.w.camview.rotation = zAngle
50835081
ACTION.CALL_MDI_WAIT('G10 L20 P0 X{} Y{}'.format(offsetX, offsetY))
50845082
ACTION.CALL_MDI_WAIT('G10 L2 P0 R{}'.format(zAngle))
5085-
if not self.boundsError['align']:
5086-
ACTION.CALL_MDI('G0 X0 Y0')
5087-
while not STATUS.is_interp_idle():
5088-
self.w.gcodegraphics.updateGL()
5083+
ACTION.CALL_MDI('G0 X0 Y0')
5084+
while not STATUS.is_interp_idle():
5085+
self.w.gcodegraphics.updateGL()
50895086
if self.fileOpened == True:
50905087
self.file_reload_clicked()
50915088
self.w.gcodegraphics.logger.clear()
@@ -5104,12 +5101,10 @@ def cam_mark_clicked(self):
51045101
self.camButtonState = self.sheet_align(self.camButtonState, self.w.cam_mark, self.camOffsetX, self.camOffsetY)
51055102

51065103
def cam_goto_clicked(self):
5107-
msgList, units, xMin, yMin, xMax, yMax = self.bounds_check('align', 0, 0)
5108-
if not self.boundsError['align']:
5109-
ACTION.CALL_MDI_WAIT('G0 X0 Y0')
5110-
while not STATUS.is_interp_idle():
5111-
self.w.gcodegraphics.updateGL()
5112-
ACTION.SET_MANUAL_MODE()
5104+
ACTION.CALL_MDI_WAIT('G0 X0 Y0')
5105+
while not STATUS.is_interp_idle():
5106+
self.w.gcodegraphics.updateGL()
5107+
ACTION.SET_MANUAL_MODE()
51135108

51145109
def cam_zoom_plus_pressed(self):
51155110
if self.w.camview.scale >= 5:

share/qtvcp/screens/qtplasmac/versions.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ <h2>QtPlasmaC Version History</h2>
3030
</table>
3131
<br>
3232
<!--- ****** ADD NEXT VERSION BELOW THIS LINE ****** --->
33+
<br><b><u>v1.235.272 2023 Apr 18</u></b>
34+
<ul style="margin:0;">
35+
<li>remove redundant bounds check for laser and camera</li>
36+
</ul>
37+
<i>Changes submitted by snowgoer540 (Greg Carl)</i><br>
38+
3339
<br><b><u>v1.235.271 2023 Mar 29</u></b>
3440
<ul style="margin:0;">
3541
<li>add horizontal and vertical scroll bars to materials pickers (if needed)</li>

0 commit comments

Comments
 (0)