chiark / gitweb /
Better variable names
authordaid <daid303@gmail.com>
Wed, 16 May 2012 12:00:53 +0000 (14:00 +0200)
committerdaid <daid303@gmail.com>
Wed, 16 May 2012 12:00:53 +0000 (14:00 +0200)
Cura/gui/projectPlanner.py

index fd011f351578d08e0a422ba249a509862d5a9b0c..8a2fc5d7057eca60e86e8f329a508fb70b076a42 100644 (file)
@@ -568,13 +568,13 @@ class projectPlanner(wx.Frame):
                        action.filename = item.filename\r
                        clearZ = max(clearZ, item.getMaximum().z * item.scale)\r
                        action.clearZ = clearZ\r
-                       action.leaveForNext = False\r
-                       action.usePrevious = False\r
+                       action.leaveResultForNextSlice = False\r
+                       action.usePreviousSlice = False\r
                        actionList.append(action)\r
 \r
                        if self.list.index(item) > 0 and item.isSameExceptForPosition(self.list[self.list.index(item)-1]):\r
-                               actionList[-2].leaveForNext = True\r
-                               actionList[-1].usePrevious = True\r
+                               actionList[-2].leaveResultForNextSlice = True\r
+                               actionList[-1].usePreviousSlice = True\r
 \r
                        if item.profile != None:\r
                                profile.loadGlobalProfileFromString(oldProfile)\r
@@ -869,14 +869,14 @@ class ProjectSliceProgressWindow(wx.Frame):
        def OnRun(self):\r
                resultFile = open(self.resultFilename, "w")\r
                put = profile.setTempOverride\r
+               self.progressLog = []\r
                for action in self.actionList:\r
                        wx.CallAfter(self.SetTitle, "Building: [%d/%d]"  % (self.actionList.index(action) + 1, len(self.actionList)))\r
-                       if not action.usePrevious:\r
+                       if not action.usePreviousSlice:\r
                                p = subprocess.Popen(action.sliceCmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)\r
                                line = p.stdout.readline()\r
                \r
                                maxValue = 1\r
-                               self.progressLog = []\r
                                while(len(line) > 0):\r
                                        line = line.rstrip()\r
                                        if line[0:9] == "Progress[" and line[-1:] == "]":\r
@@ -913,7 +913,7 @@ class ProjectSliceProgressWindow(wx.Frame):
                        resultFile.write(';PRINTNR:%d\n' % self.actionList.index(action))\r
                        profile.resetTempOverride()\r
                        \r
-                       if not action.usePrevious:\r
+                       if not action.usePreviousSlice:\r
                                f = open(action.filename[: action.filename.rfind('.')] + "_export.project_tmp", "r")\r
                                data = f.read(4096)\r
                                while data != '':\r
@@ -933,7 +933,7 @@ class ProjectSliceProgressWindow(wx.Frame):
                                        resultFile.write(line)\r
                                f.close()\r
 \r
-                       if not action.leaveForNext:\r
+                       if not action.leaveResultForNextSlice:\r
                                os.remove(action.filename[: action.filename.rfind('.')] + "_export.project_tmp")\r
                        \r
                        wx.CallAfter(self.progressGauge.SetValue, 10000)\r