chiark / gitweb /
Report total time spend slicing after project planner slice
authordaid <daid303@gmail.com>
Wed, 25 Apr 2012 13:49:43 +0000 (15:49 +0200)
committerdaid <daid303@gmail.com>
Wed, 25 Apr 2012 13:49:43 +0000 (15:49 +0200)
Cura/gui/projectPlanner.py
Cura/gui/sliceProgessPanel.py

index 18027f67f1f70ca653814063777f3c7a4d0349a8..31162255926dff29b138a141d4ef40b4045c4d04 100644 (file)
@@ -610,6 +610,7 @@ class ProjectSliceProgressWindow(wx.Frame):
                self.prevStep = 'start'\r
                self.totalDoneFactor = 0.0\r
                self.startTime = time.time()\r
+               self.sliceStartTime = time.time()\r
                \r
                #How long does each step take compared to the others. This is used to make a better scaled progress bar, and guess time left.\r
                # TODO: Duplicate with sliceProgressPanel, move to sliceRun.\r
@@ -724,12 +725,15 @@ class ProjectSliceProgressWindow(wx.Frame):
                        os.remove(action.filename[: action.filename.rfind('.')] + "_export.project_tmp")\r
                        \r
                        wx.CallAfter(self.progressGauge.SetValue, 10000)\r
+                       self.totalDoneFactor = 0.0\r
                        wx.CallAfter(self.progressGauge2.SetValue, self.actionList.index(action) + 1)\r
                \r
                resultFile.write(';TYPE:CUSTOM\n')\r
                resultFile.write(profile.getAlterationFileContents('end.gcode'))\r
                resultFile.close()\r
                self.abort = True\r
+               sliceTime = time.time() - self.sliceStartTime\r
+               wx.CallAfter(self.statusText.SetLabel, 'Slicing took: %d:%d' % (sliceTime / 60, sliceTime % 60))\r
                wx.CallAfter(self.abortButton.SetLabel, 'Close')\r
 \r
 def main():\r
index 172565b5f71aeb42ebc99d5be5440c38525f5b3e..3c87e22ae0f9b2452082809fec2768f9b059d1b6 100644 (file)
@@ -63,7 +63,7 @@ class sliceProgessPanel(wx.Panel):
                        print filename, self.filelist.index(filename)
                        if self.filelist.index(filename) > 0:
                                profile.putProfileSetting('fan_enabled', 'False')
-                               profile.putProfileSetting('skirt_lines', '0')
+                               profile.putProfileSetting('skirt_line_count', '0')
                        if len(self.filelist) > 1:
                                profile.putProfileSetting('add_start_end_gcode', 'False')
                                profile.putProfileSetting('gcode_extension', 'multi_extrude_tmp')