Skip to content

Commit

Permalink
qtplasmac: change set_margin_width to set_margin_metric
Browse files Browse the repository at this point in the history
fixes crash caused by commit 96bc4e7
  • Loading branch information
snowgoer540 committed May 18, 2023
1 parent 73cd2c4 commit beacb3c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
14 changes: 7 additions & 7 deletions share/qtvcp/screens/qtplasmac/qtplasmac_handler.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION = '1.235.273'
VERSION = '1.235.274'

'''
qtplasmac_handler.py
Expand Down Expand Up @@ -963,13 +963,13 @@ def init_widgets(self):
self.w.conv_material.view().setHorizontalScrollBarPolicy(Qt.ScrollBarAsNeeded)
self.w.materials_box.view().setVerticalScrollBarPolicy(Qt.ScrollBarAsNeeded)
self.w.materials_box.view().setHorizontalScrollBarPolicy(Qt.ScrollBarAsNeeded)
self.w.gcode_display.set_margin_width(3)
self.w.gcode_display.set_margin_metric(3)
self.w.gcode_display.setBraceMatching(False)
self.w.gcode_display.setCaretWidth(0)
self.w.gcode_display.setCornerWidget(QLabel())
self.w.gcode_editor.topBox.setContentsMargins(4,4,4,4)
self.w.gcode_editor.bottomBox.setContentsMargins(4,4,4,4)
self.w.gcode_editor.set_margin_width(3)
self.w.gcode_editor.set_margin_metric(3)
self.w.gcode_editor.editor.setBraceMatching(False)
self.w.gcode_editor.editor.setCaretWidth(4)
self.w.gcode_editor.editor.setCornerWidget(QLabel())
Expand Down Expand Up @@ -1541,8 +1541,8 @@ def file_loaded(self, obj, filename):
self.w.gcode_editor.editor.new_text()
self.w.gcode_editor.editor.setModified(False)
self.w.gcode_display.new_text()
self.w.gcode_display.set_margin_width(3)
self.w.gcode_editor.set_margin_width(3)
self.w.gcode_display.set_margin_metric(3)
self.w.gcode_editor.set_margin_metric(3)
ACTION.SET_MANUAL_MODE()
if not len(self.w.gcode_display.text()):
self.w.gcode_display.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
Expand Down Expand Up @@ -2029,8 +2029,8 @@ def zoom_out_pressed(self):

def gcode_display_loaded(self):
gcodeLines = len(str(self.w.gcode_display.lines()))
self.w.gcode_display.set_margin_width(gcodeLines)
self.w.gcode_editor.set_margin_width(gcodeLines)
self.w.gcode_display.set_margin_metric(gcodeLines)
self.w.gcode_editor.set_margin_metric(gcodeLines)

def file_clear_clicked(self):
if self.fileOpened:
Expand Down
6 changes: 6 additions & 0 deletions share/qtvcp/screens/qtplasmac/versions.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ <h2>QtPlasmaC Version History</h2>
</table>
<br>
<!--- ****** ADD NEXT VERSION BELOW THIS LINE ****** --->
<br><b><u>v1.235.274 2023 May 17</u></b>
<ul style="margin:0;">
<li>change set_margin_width to set_margin_metric</li>
</ul>
<i>Changes submitted by snowgoer540 (Greg Carl)</i><br>

<br><b><u>v1.235.273 2023 Apr 25</u></b>
<ul style="margin:0;">
<li>prevent hang on large moves from user buttons</li>
Expand Down

0 comments on commit beacb3c

Please sign in to comment.