- fixed an error when trying to view the source file and there is no object selected

This commit is contained in:
Marius Stanciu
2019-10-21 05:32:23 +03:00
committed by Marius
parent 9b9f99d824
commit 6b1df4d0e3
2 changed files with 6 additions and 0 deletions

View File

@@ -9587,6 +9587,11 @@ class App(QtCore.QObject):
_("Select an Gerber or Excellon file to view it's source file."))
return 'fail'
if obj is None:
self.inform.emit('[WARNING_NOTCL] %s' %
_("Select an Gerber or Excellon file to view it's source file."))
return 'fail'
flt = "All Files (*.*)"
if obj.kind == 'gerber':
flt = "Gerber Files (*.GBR);;All Files (*.*)"