Blob Blame Raw
From 36eff4ab1f33da4774d2a97403674b7500fbae5c Mon Sep 17 00:00:00 2001
From: Guillaume Seguin <guillaume@segu.in>
Date: Sat, 8 Mar 2014 10:04:48 +0100
Subject: [PATCH] Move back code which was incorrectly moved to pronsole

---
 printrun/pronsole.py    | 2 --
 printrun/pronterface.py | 1 +
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/printrun/pronsole.py b/printrun/pronsole.py
index d034b62..dec1ba8 100644
--- a/printrun/pronsole.py
+++ b/printrun/pronsole.py
@@ -1154,8 +1154,6 @@ def endcb(self):
             print _("Print ended at: %(end_time)s and took %(duration)s") % {"end_time": format_time(time.time()),
                                                                              "duration": format_duration(print_duration)}
 
-            self.p.runSmallScript(self.endScript)
-
             if not self.settings.final_command:
                 return
             run_command(self.settings.final_command,
diff --git a/printrun/pronterface.py b/printrun/pronterface.py
index 9d2a4fa..c469cc3 100644
--- a/printrun/pronterface.py
+++ b/printrun/pronterface.py
@@ -304,6 +304,7 @@ def startcb(self, resuming = False):
     def endcb(self):
         pronsole.pronsole.endcb(self)
         if self.p.queueindex == 0:
+            self.p.runSmallScript(self.endScript)
             wx.CallAfter(self.pausebtn.Disable)
             wx.CallAfter(self.printbtn.SetLabel, _("Print"))
 
-- 
1.8.5.5