- 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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user