- 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

@@ -12,8 +12,10 @@ from abc import ABCMeta, abstractmethod
import math
# module-root dictionary of preprocessors
import FlatCAMApp
import logging
log = logging.getLogger('base')
preprocessors = {}
@@ -23,7 +25,7 @@ class ABCPostProcRegister(ABCMeta):
newclass = super(ABCPostProcRegister, cls).__new__(cls, clsname, bases, attrs)
if object not in bases:
if newclass.__name__ in preprocessors:
FlatCAMApp.App.log.warning('Preprocessor %s has been overriden' % newclass.__name__)
log.warning('Preprocessor %s has been overriden' % newclass.__name__)
preprocessors[newclass.__name__] = newclass() # here is your register function
return newclass