fix corrupted presets error (#715)

pull/721/head
Kaalleen 2020-05-20 20:08:59 +02:00 zatwierdzone przez GitHub
rodzic c65b437cae
commit 5c7b97c9fe
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
3 zmienionych plików z 6 dodań i 6 usunięć

Wyświetl plik

@ -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)]

Wyświetl plik

@ -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):

Wyświetl plik

@ -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')