Skip to content

Commit 25fdb58

Browse files
committed
qtplasmac: fix file load after single cut
Fixes an oversight in commit a76a785 which caused the previously loaded file to load, even after file clear was clicked. Also fixes a zoom bug. Thanks to LucasWorx on the forum for reporting the bug.
1 parent 9c8b996 commit 25fdb58

2 files changed

Lines changed: 10 additions & 7 deletions

File tree

share/qtvcp/screens/qtplasmac/qtplasmac_handler.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
VERSION = '238.314'
1+
VERSION = '238.315'
22
LCNCVER = '2.9'
33
DOCSVER = LCNCVER
44

@@ -1571,7 +1571,8 @@ def file_loaded(self, obj, filename):
15711571
if not self.cameraOn:
15721572
self.preview_index_return(self.w.preview_stack.currentIndex())
15731573
self.w.file_open.setText(os.path.basename(filename))
1574-
self.fileOpened = True
1574+
if not self.single_cut_request:
1575+
self.fileOpened = True
15751576
text = _translate('HandlerClass', 'EDIT')
15761577
self.w.edit_label.setText('{}: {}'.format(text, filename))
15771578
if self.w.gcode_stack.currentIndex() != self.GCODE:
@@ -1625,11 +1626,8 @@ def file_loaded(self, obj, filename):
16251626
self.w.gcode_display.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
16261627
if self.w.main_tab_widget.currentIndex() != self.MAIN:
16271628
self.w.main_tab_widget.setCurrentIndex(self.MAIN)
1628-
# forces the view to remain "table view" if T is checked when a file is loaded
1629-
if self.fileOpened:
1630-
if self.w.view_t.isChecked():
1631-
self.view_t_pressed()
1632-
else:
1629+
# forces the view to remain "table view" if T is checked when a file is loaded, or change to table view upon clicking CLEAR
1630+
if self.w.view_t.isChecked() or 'qtplasmac_program_clear.ngc' in filename:
16331631
self.view_t_pressed()
16341632
if not 'single_cut.ngc' in filename:
16351633
self.preSingleCutMaterial = None

share/qtvcp/screens/qtplasmac/versions.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ <h2>QtPlasmaC Version History - LinuxCNC 2.9</h2>
2626
</table>
2727
<br>
2828
<!--- ****** ADD NEXT VERSION BELOW THIS LINE ****** --->
29+
<br><b><u>238.315 2024 Aug 21</u></b>
30+
<ul style="margin:0;">
31+
<li>fix file load after single cut</li>
32+
</ul>
33+
2934
<br><b><u>238.314 2024 Apr 21</u></b>
3035
<ul style="margin:0;">
3136
<li>conv_polygon fix variable name</li>

0 commit comments

Comments
 (0)