Просмотр исходного кода

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

Marius Stanciu 6 лет назад
Родитель
Сommit
6b1df4d0e3
2 измененных файлов с 6 добавлено и 0 удалено
  1. 5 0
      FlatCAMApp.py
  2. 1 0
      README.md

+ 5 - 0
FlatCAMApp.py

@@ -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 (*.*)"

+ 1 - 0
README.md

@@ -12,6 +12,7 @@ CAD program, and create G-Code for Isolation routing.
 21.10.2019
 
 - the context menu for the Tabs in notebook and PlotTabArea is launched now on right mouse click on tabs themselves
+- fixed an error when trying to view the source file and there is no object selected
 
 18.10.2019