From 78b6aa9a83d9c7b047e8c1e8706dcede918b0d5b Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Mon, 16 Sep 2019 03:47:28 +0300 Subject: [PATCH] - fixed Scripts repeating multiple time when the Code Editor is used. This repetition was correlated with multiple openings of the Code Editor window (especially after an error) - added the autocomplete keywords that can be changed to the defaults dictionary --- FlatCAMApp.py | 34 +++++++++++++++++----------------- README.md | 2 ++ 2 files changed, 19 insertions(+), 17 deletions(-) diff --git a/FlatCAMApp.py b/FlatCAMApp.py index a0f802f4..3841b963 100644 --- a/FlatCAMApp.py +++ b/FlatCAMApp.py @@ -844,6 +844,22 @@ class App(QtCore.QObject): "global_point_clipboard_format": "(%.4f, %.4f)", "global_zdownrate": None, + # autocomplete keywords + "global_autocomplete_keywords": + ['all', 'angle_x', 'angle_y', 'axis', 'axisoffset', 'box', 'center_x', 'center_y', + 'columns', 'combine', 'connect', 'contour', 'depthperpass', 'dia', 'diatol', 'dist', + 'drilled_dias', 'drillz', 'pp', + 'gridoffsety', 'gridx', 'gridy', 'has_offset', 'holes', 'margin', 'method', + 'milled_dias', + 'minoffset', 'multidepth', 'name', 'offset', 'opt_type', 'order', 'outname', + 'overlap', 'passes', 'postamble', 'ppname_e', 'ppname_g', 'preamble', 'radius', 'ref', + 'rest', 'rows', 'scale_factor', 'spacing_columns', 'spacing_rows', 'spindlespeed', + 'use_threads', 'value', 'x', 'x0', 'x1', 'y', 'y0', 'y1', 'z_cut', 'z_move', + 'default', 'feedrate_z', 'grbl_11', 'grbl_laser', 'hpgl', 'line_xyz', 'marlin', + 'Paste_1', 'Repetier', 'Toolchange_Custom', 'Roland_MDX_20', 'Toolchange_manual', + 'Toolchange_Probe_MACH3', 'dwell', 'dwelltime', 'toolchange_xy', 'iso_type', + 'Desktop', 'FlatPrj', 'FlatConfig', 'Users', 'Documents', 'My Documents', 'Marius' + ], # General GUI Settings "global_hover": False, "global_selection_shape": True, @@ -1904,23 +1920,7 @@ class App(QtCore.QObject): 'version', 'write_gcode' ] - self.ordinary_keywords = ['all', 'angle_x', 'angle_y', 'axis', 'axisoffset', 'box', 'center_x', 'center_y', - 'columns', 'combine', 'connect', 'contour', 'depthperpass', 'dia', 'diatol', 'dist', - 'drilled_dias', 'drillz', 'pp', - 'endz', 'extracut', 'factor', 'False', 'false', 'feedrate', 'feedrate_rapid', - 'filename', 'follow', 'gaps', 'gapsize', 'grid', 'gridoffset', 'gridoffsetx', - 'gridoffsety', 'gridx', 'gridy', 'has_offset', 'holes', 'margin', 'method', - 'milled_dias', - 'minoffset', 'multidepth', 'name', 'offset', 'opt_type', 'order', 'outname', - 'overlap', 'passes', 'postamble', 'ppname_e', 'ppname_g', 'preamble', 'radius', 'ref', - 'rest', 'rows', 'scale_factor', 'spacing_columns', 'spacing_rows', 'spindlespeed', - 'toolchange', 'toolchangez', 'tooldia', 'tools', 'travelz', 'True', 'true', 'type', - 'use_threads', 'value', 'x', 'x0', 'x1', 'y', 'y0', 'y1', 'z_cut', 'z_move', - 'default', 'feedrate_z', 'grbl_11', 'grbl_laser', 'hpgl', 'line_xyz', 'marlin', - 'Paste_1', 'Repetier', 'Toolchange_Custom', 'Roland_MDX_20', 'Toolchange_manual', - 'Toolchange_Probe_MACH3', 'dwell', 'dwelltime', 'toolchange_xy', 'iso_type', - 'Desktop', 'FlatPrj', 'FlatConfig', 'Users', 'Documents', 'My Documents', 'Marius' - ] + self.ordinary_keywords = self.defaults["global_autocomplete_keywords"] self.tcl_keywords = [ 'after', 'append', 'apply', 'argc', 'argv', 'argv0', 'array', 'attemptckalloc', 'attemptckrealloc', diff --git a/README.md b/README.md index a06549c4..3716270c 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,8 @@ CAD program, and create G-Code for Isolation routing. - added new TclCommands: NewExcellon, NewGerber - fixed the TclCommand open_project - added the outname parameter (and established an default name when outname not used) for the AlignDrillGrid and AlignDrill TclCommands +- fixed Scripts repeating multiple time when the Code Editor is used. This repetition was correlated with multiple openings of the Code Editor window (especially after an error) +- added the autocomplete keywords that can be changed to the defaults dictionary 14.09.2019