- replaced the testing if instance of FlatCAMObj with testing the obj.kind attribute

- removed the import of the whole FlatCAMApp file only for the usage of GracefulException
- remove the import of FlatCAMApp and used alternate ways
- optimized the imports in some files
- moved the Bookmarksmanager and ToolDB classes into their own files
- solved some bugs that were not so visible in the Editors and HPGL parser
This commit is contained in:
Marius Stanciu
2020-04-27 10:03:22 +03:00
committed by Marius
parent 61020e3624
commit 3ec666edbb
28 changed files with 3452 additions and 3389 deletions

View File

@@ -3,7 +3,6 @@ from PyQt5 import QtWidgets, QtCore
from FlatCAMTool import FlatCAMTool
from flatcamGUI.GUIElements import RadioSet, FCDoubleSpinner, EvalEntry, FCEntry, FCButton, FCComboBox
from FlatCAMObj import FlatCAMGerber, FlatCAMExcellon, FlatCAMGeometry
from numpy import Inf
@@ -658,7 +657,7 @@ class DblSidedTool(FlatCAMTool):
self.app.inform.emit('[WARNING_NOTCL] %s' % _("There is no Gerber object loaded ..."))
return
if not isinstance(fcobj, FlatCAMGerber):
if fcobj.kind != 'gerber':
self.app.inform.emit('[ERROR_NOTCL] %s' % _("Only Gerber, Excellon and Geometry objects can be mirrored."))
return
@@ -701,7 +700,7 @@ class DblSidedTool(FlatCAMTool):
self.app.inform.emit('[WARNING_NOTCL] %s' % _("There is no Excellon object loaded ..."))
return
if not isinstance(fcobj, FlatCAMExcellon):
if fcobj.kind != 'excellon':
self.app.inform.emit('[ERROR_NOTCL] %s' % _("Only Gerber, Excellon and Geometry objects can be mirrored."))
return
@@ -745,7 +744,7 @@ class DblSidedTool(FlatCAMTool):
self.app.inform.emit('[WARNING_NOTCL] %s' % _("There is no Geometry object loaded ..."))
return
if not isinstance(fcobj, FlatCAMGeometry):
if fcobj.kind != 'geometry':
self.app.inform.emit('[ERROR_NOTCL] %s' % _("Only Gerber, Excellon and Geometry objects can be mirrored."))
return