We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f70196f commit 56c4a75Copy full SHA for 56c4a75
1 file changed
lib/python/qtvcp/widgets/gcode_editor.py
@@ -326,6 +326,8 @@ def new_text(self):
326
327
def load_text(self, filepath):
328
self.filepath = filepath
329
+ if filepath is None:
330
+ return
331
try:
332
fp = os.path.expanduser(filepath)
333
with open(fp) as f:
@@ -334,6 +336,10 @@ def load_text(self, filepath):
334
336
LOG.error("load_text(): {}".format(e))
335
337
self.setText('')
338
return
339
+ except Exception as e:
340
+ LOG.error("load_text(): {}".format(e))
341
+ self.setText('')
342
343
self.ensureCursorVisible()
344
self.SendScintilla(QsciScintilla.SCI_VERTICALCENTRECARET)
345
self.setModified(False)
0 commit comments