kopia lustrzana https://github.com/inkstitch/inkstitch
rodzic
89b472d319
commit
ab2e182d1e
|
@ -18,15 +18,15 @@ class UpdateSvg(InkstitchExtension):
|
|||
# 3 -> v.3.2.0 May2025
|
||||
|
||||
def effect(self):
|
||||
# set the file version to the update_from value, so that the updater knows where to start from
|
||||
# the updater will then reset it to the current version after the update has finished
|
||||
metadata = self.get_inkstitch_metadata()
|
||||
metadata['inkstitch_svg_version'] = self.options.update_from
|
||||
|
||||
if not self.svg.selection:
|
||||
update_inkstitch_document(self.document, warn_unversioned=False)
|
||||
else:
|
||||
# set the file version to the update_from value, so that the updater knows where to start from
|
||||
# the updater will then reset it to the current version after the update has finished
|
||||
metadata = self.get_inkstitch_metadata()
|
||||
metadata['inkstitch_svg_version'] = self.options.update_from
|
||||
|
||||
update_inkstitch_document(self.document, self.get_selection(), warn_unversioned=False)
|
||||
update_inkstitch_document(self.document, self.get_selection(), warn_unversioned=False)
|
||||
|
||||
def get_selection(self):
|
||||
selection = []
|
||||
|
|
|
@ -69,9 +69,9 @@ def automatic_version_update(document, file_version, INKSTITCH_SVG_VERSION, warn
|
|||
if do_update.cancelled is True:
|
||||
return
|
||||
# well then, let's update legeacy params
|
||||
for element in document.iterdescendants():
|
||||
if element.tag in EMBROIDERABLE_TAGS:
|
||||
update_legacy_params(document, EmbroideryElement(element), file_version, INKSTITCH_SVG_VERSION)
|
||||
# oddly we have to convert this into a list, otherwise a bunch of elements is missing
|
||||
for node in list(document.iterdescendants(EMBROIDERABLE_TAGS)):
|
||||
update_legacy_params(document, EmbroideryElement(node), file_version, INKSTITCH_SVG_VERSION)
|
||||
|
||||
|
||||
def _update_inkstitch_svg_version(svg):
|
||||
|
|
Ładowanie…
Reference in New Issue