diff --git a/CHANGELOG.md b/CHANGELOG.md index 6bf77942..3b56ac72 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ CHANGELOG for FlatCAM beta - created two new preprocessors (from 'default' and from 'grbl_11') that will have no toolchange commands regardless of the settings in the software - updated the Turkish translation (by Mehmet Kaya) - the methods of the APP class that were the handlers for the File menu are now moved to their oen class +- fixed some of the Tcl Commands that depended on the methods refactored above 23.10.2020 diff --git a/app_Main.py b/app_Main.py index d86014e8..2d3aebab 100644 --- a/app_Main.py +++ b/app_Main.py @@ -423,8 +423,6 @@ class App(QtCore.QObject): # ############################################################################################################ self.defaults = FlatCAMDefaults(beta=self.beta, version=self.version) - self.defaults["root_folder_path"] = self.app_home - current_defaults_path = os.path.join(self.data_path, "current_defaults.FlatConfig") if user_defaults: self.defaults.load(filename=current_defaults_path, inform=self.inform) @@ -1314,6 +1312,9 @@ class App(QtCore.QObject): # ########################################################################################################### self.f_handlers = MenuFileHandlers(app=self) + # this is calculated in the class above (somehow?) + self.defaults["root_folder_path"] = self.app_home + # ########################################################################################################### # ############################################ SETUP RECENT ITEMS ########################################### # ########################################################################################################### diff --git a/tclCommands/TclCommandGetSys.py b/tclCommands/TclCommandGetSys.py index d5032464..e5adca87 100644 --- a/tclCommands/TclCommandGetSys.py +++ b/tclCommands/TclCommandGetSys.py @@ -57,3 +57,5 @@ class TclCommandGetSys(TclCommand): if name in self.app.defaults: return self.app.defaults[name] + else: + return "The keyword: %s does not exist as a parameter" % str(name) diff --git a/tclCommands/TclCommandOpenExcellon.py b/tclCommands/TclCommandOpenExcellon.py index 8c187f26..3853d5b7 100644 --- a/tclCommands/TclCommandOpenExcellon.py +++ b/tclCommands/TclCommandOpenExcellon.py @@ -59,4 +59,4 @@ class TclCommandOpenExcellon(TclCommandSignaled): args['plot'] = False args['from_tcl'] = True - self.app.open_excellon(filename, **args) + self.app.f_handlers.open_excellon(filename, **args) diff --git a/tclCommands/TclCommandOpenGCode.py b/tclCommands/TclCommandOpenGCode.py index 9d6ba448..ec74d261 100644 --- a/tclCommands/TclCommandOpenGCode.py +++ b/tclCommands/TclCommandOpenGCode.py @@ -58,4 +58,4 @@ class TclCommandOpenGCode(TclCommandSignaled): # return "The absolute path to the project file contain spaces which is not allowed.\n" \ # "Please enclose the path within quotes." - self.app.open_gcode(filename, **args) + self.app.f_handlers.open_gcode(filename, **args) diff --git a/tclCommands/TclCommandOpenGerber.py b/tclCommands/TclCommandOpenGerber.py index e3abcb3a..8bcaeed1 100644 --- a/tclCommands/TclCommandOpenGerber.py +++ b/tclCommands/TclCommandOpenGerber.py @@ -62,4 +62,4 @@ class TclCommandOpenGerber(TclCommandSignaled): args['plot'] = False args['from_tcl'] = True - self.app.open_gerber(filename, outname, **args) + self.app.f_handlers.open_gerber(filename, outname, **args) diff --git a/tclCommands/TclCommandOpenProject.py b/tclCommands/TclCommandOpenProject.py index 64477b71..4b1da648 100644 --- a/tclCommands/TclCommandOpenProject.py +++ b/tclCommands/TclCommandOpenProject.py @@ -53,4 +53,4 @@ class TclCommandOpenProject(TclCommandSignaled): # return "The absolute path to the project file contain spaces which is not allowed.\n" \ # "Please enclose the path within quotes." - self.app.open_project(filename, cli=True, plot=False, from_tcl=True) + self.app.f_handlers.open_project(filename, cli=True, plot=False, from_tcl=True)