Skip to content
Permalink
Browse files
[processing] don't crash if user canceled script loading
  • Loading branch information
alexbruy committed May 12, 2016
1 parent 6886ea0 commit 583eaef
Showing 1 changed file with 3 additions and 0 deletions.
@@ -203,6 +203,9 @@ def openScript(self):
self.filename = QFileDialog.getOpenFileName(
self, self.tr('Save script'), scriptDir, filterName)

if self.filename == '':
return

QApplication.setOverrideCursor(QCursor(Qt.WaitCursor))
with codecs.open(self.filename, 'r', encoding='utf-8') as f:
txt = f.read()

0 comments on commit 583eaef

Please sign in to comment.