kopia lustrzana https://github.com/inkstitch/inkstitch
fix corrupted presets error (#715)
rodzic
c65b437cae
commit
5c7b97c9fe
|
@ -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)]
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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')
|
||||
|
|
Ładowanie…
Reference in New Issue