diff options
| author | Lex Neva <lexelby@users.noreply.github.com> | 2018-09-12 20:49:31 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-09-12 20:49:31 -0400 |
| commit | 3fd741a1a4218b6559184aaadcde8abca178bde2 (patch) | |
| tree | 638a96776f6deecb82150b2b97efb372084e464c /lib/extensions/simulate.py | |
| parent | eff7c8d8ce7c9c1f8396c99bcf5fc15078ff99b7 (diff) | |
| parent | a876066c75eafc20547b055c5dffe8e89e4c327f (diff) | |
Merge pull request #284 from inkstitch/simulator-timeline
simulator timeline
Diffstat (limited to 'lib/extensions/simulate.py')
| -rw-r--r-- | lib/extensions/simulate.py | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/lib/extensions/simulate.py b/lib/extensions/simulate.py index 38f86156..f962b206 100644 --- a/lib/extensions/simulate.py +++ b/lib/extensions/simulate.py @@ -1,8 +1,5 @@ -import wx - from .base import InkstitchExtension -from ..i18n import _ -from ..simulator import EmbroiderySimulator +from ..simulator import show_simulator from ..stitch_plan import patches_to_stitch_plan @@ -19,15 +16,4 @@ class Simulate(InkstitchExtension): return patches = self.elements_to_patches(self.elements) stitch_plan = patches_to_stitch_plan(patches) - app = wx.App() - 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) - app.MainLoop() + show_simulator(stitch_plan) |
