kopia lustrzana https://github.com/inkstitch/inkstitch
don't crash on a design with no stitches
rodzic
c8d354a2fc
commit
004df12e88
lib
|
@ -385,8 +385,8 @@ class DrawingPanel(wx.Panel):
|
|||
self.go()
|
||||
|
||||
def choose_zoom_and_pan(self, event=None):
|
||||
# ignore if called before we load the stitch plan
|
||||
if not self.width and not self.height:
|
||||
# ignore if EVT_SIZE fired before we load the stitch plan
|
||||
if not self.width and not self.height and event is not None:
|
||||
return
|
||||
|
||||
panel_width, panel_height = self.GetClientSize()
|
||||
|
|
|
@ -5,6 +5,7 @@ import simpletransform
|
|||
|
||||
from .commands import global_command
|
||||
from .i18n import _
|
||||
from .stitch_plan import Stitch
|
||||
from .svg import PIXELS_PER_MM, get_doc_size, get_viewbox_transform
|
||||
from .utils import Point
|
||||
|
||||
|
@ -58,6 +59,7 @@ def write_embroidery_file(file_path, stitch_plan, svg, settings={}):
|
|||
origin = get_origin(svg)
|
||||
|
||||
pattern = pyembroidery.EmbPattern()
|
||||
stitch = Stitch(0, 0)
|
||||
|
||||
for color_block in stitch_plan:
|
||||
pattern.add_thread(color_block.color.pyembroidery_thread)
|
||||
|
|
Ładowanie…
Reference in New Issue