summaryrefslogtreecommitdiff
path: root/lib/extensions/simulate.py
diff options
context:
space:
mode:
authorLex Neva <github.com@lexneva.name>2018-08-17 16:08:02 -0400
committerLex Neva <github.com@lexneva.name>2018-08-17 16:08:02 -0400
commit72b8c367db613c3f44bce1174a8a5e8226bd2863 (patch)
tree0daf0758b275a2eb4d794c202dc8d2c0e17749eb /lib/extensions/simulate.py
parentef17511c66a9f59bb9c74cb6f94f71e044c4fef1 (diff)
parentd7fddb0c946e19c571325a88ae5516bcbd0df128 (diff)
Merge remote-tracking branch 'origin/master' into lexelby-auto-fill-run
Diffstat (limited to 'lib/extensions/simulate.py')
-rw-r--r--lib/extensions/simulate.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/extensions/simulate.py b/lib/extensions/simulate.py
index 0c372d4d..38f86156 100644
--- a/lib/extensions/simulate.py
+++ b/lib/extensions/simulate.py
@@ -17,11 +17,16 @@ class Simulate(InkstitchExtension):
def effect(self):
if not self.get_elements():
return
-
patches = self.elements_to_patches(self.elements)
stitch_plan = patches_to_stitch_plan(patches)
app = wx.App()
- frame = EmbroiderySimulator(None, -1, _("Embroidery Simulation"), wx.DefaultPosition, size=(1000, 1000), stitch_plan=stitch_plan)
+ current_screen = wx.Display.GetFromPoint(wx.GetMousePosition())
+ display = wx.Display(current_screen)
+ screen_rect = display.GetClientArea()
+
+ simulator_pos = (screen_rect[0], screen_rect[1])
+
+ frame = EmbroiderySimulator(None, -1, _("Embroidery Simulation"), pos=simulator_pos, size=(1000, 1000), stitch_plan=stitch_plan)
app.SetTopWindow(frame)
frame.Show()
wx.CallAfter(frame.go)