97023e
From 36eff4ab1f33da4774d2a97403674b7500fbae5c Mon Sep 17 00:00:00 2001
97023e
From: Guillaume Seguin <guillaume@segu.in>
97023e
Date: Sat, 8 Mar 2014 10:04:48 +0100
97023e
Subject: [PATCH] Move back code which was incorrectly moved to pronsole
97023e
97023e
---
97023e
 printrun/pronsole.py    | 2 --
97023e
 printrun/pronterface.py | 1 +
97023e
 2 files changed, 1 insertion(+), 2 deletions(-)
97023e
97023e
diff --git a/printrun/pronsole.py b/printrun/pronsole.py
97023e
index d034b62..dec1ba8 100644
97023e
--- a/printrun/pronsole.py
97023e
+++ b/printrun/pronsole.py
97023e
@@ -1154,8 +1154,6 @@ def endcb(self):
97023e
             print _("Print ended at: %(end_time)s and took %(duration)s") % {"end_time": format_time(time.time()),
97023e
                                                                              "duration": format_duration(print_duration)}
97023e
 
97023e
-            self.p.runSmallScript(self.endScript)
97023e
-
97023e
             if not self.settings.final_command:
97023e
                 return
97023e
             run_command(self.settings.final_command,
97023e
diff --git a/printrun/pronterface.py b/printrun/pronterface.py
97023e
index 9d2a4fa..c469cc3 100644
97023e
--- a/printrun/pronterface.py
97023e
+++ b/printrun/pronterface.py
97023e
@@ -304,6 +304,7 @@ def startcb(self, resuming = False):
97023e
     def endcb(self):
97023e
         pronsole.pronsole.endcb(self)
97023e
         if self.p.queueindex == 0:
97023e
+            self.p.runSmallScript(self.endScript)
97023e
             wx.CallAfter(self.pausebtn.Disable)
97023e
             wx.CallAfter(self.printbtn.SetLabel, _("Print"))
97023e
 
97023e
-- 
97023e
1.8.5.5
97023e