diff options
| author | Kaalleen <36401965+kaalleen@users.noreply.github.com> | 2020-05-20 20:08:59 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-20 20:08:59 +0200 |
| commit | 5c7b97c9feac43f22935ea468dc77aefe04836ba (patch) | |
| tree | a062aa4b2a196115a157ea35d4ac9bb9c640b560 | |
| parent | c65b437cae365f0bec17aa70815f64eda4336514 (diff) | |
fix corrupted presets error (#715)
| -rw-r--r-- | lib/elements/fill.py | 2 | ||||
| -rw-r--r-- | lib/gui/presets.py | 2 | ||||
| -rw-r--r-- | lib/svg/tags.py | 8 |
3 files changed, 6 insertions, 6 deletions
diff --git a/lib/elements/fill.py b/lib/elements/fill.py index 5c6beca5..83a224e4 100644 --- a/lib/elements/fill.py +++ b/lib/elements/fill.py @@ -122,7 +122,7 @@ class Fill(EmbroideryElement): @cache def paths(self): paths = self.flatten(self.parse_path()) - #ensure path length + # ensure path length for i, path in enumerate(paths): if len(path) < 3: paths[i] = [(path[0][0], path[0][1]), (path[0][0]+1.0, path[0][1]), (path[0][0], path[0][1]+1.0)] diff --git a/lib/gui/presets.py b/lib/gui/presets.py index bd0b1787..b3312f0e 100644 --- a/lib/gui/presets.py +++ b/lib/gui/presets.py @@ -98,7 +98,7 @@ class PresetsPanel(wx.Panel): with open(self.presets_path(), 'r') as presets: presets = json.load(presets) return presets - except IOError: + except (IOError, ValueError): return {} def _save_presets(self, presets): diff --git a/lib/svg/tags.py b/lib/svg/tags.py index 589f489e..3dcf3010 100644 --- a/lib/svg/tags.py +++ b/lib/svg/tags.py @@ -41,10 +41,10 @@ SVG_OBJECT_TAGS = (SVG_ELLIPSE_TAG, SVG_CIRCLE_TAG, SVG_RECT_TAG) INKSTITCH_ATTRIBS = {} inkstitch_attribs = [ 'ties', - 'trim_after', - 'stop_after', # clone 'clone', + # polyline + 'polyline', # fill 'angle', 'auto_fill', @@ -86,8 +86,8 @@ inkstitch_attribs = [ 'pull_compensation_mm', 'stroke_first', # Legacy - 'embroider_trim_after', - 'embroider_stop_after' + 'trim_after', + 'stop_after' ] for attrib in inkstitch_attribs: INKSTITCH_ATTRIBS[attrib] = inkex.addNS(attrib, 'inkstitch') |
