chiark / gitweb /
Refactoring
authornickthetait <tait@alephobjects.com>
Wed, 1 Jul 2015 19:39:02 +0000 (13:39 -0600)
committernickthetait <tait@alephobjects.com>
Wed, 1 Jul 2015 19:48:36 +0000 (13:48 -0600)
Rename variables for clarity

Cura/gui/printWindow.py

index bb2dc4b2a53fc8e6a8fc6369675f54cef397ec92..920367f3f8192b963b6c5830717e0400afec09f3 100644 (file)
@@ -523,17 +523,17 @@ class printWindowBasic(wx.Frame):
                #self.temperatureGraph.addPoint(temp, [0], connection.getBedTemperature(), 0)
 
        def __doPrinterConnectionUpdate(self, connection, extraInfo):
-               t = time.time()
-               if self._lastUpdateTime + 0.5 > t and extraInfo is None:
+               now = time.time()
+               if self._lastUpdateTime + 0.5 > now and extraInfo is None:
                        return
-               self._lastUpdateTime = t
+               self._lastUpdateTime = now
 
                if extraInfo is not None and len(extraInfo) > 0:
                        self._addTermLog('< %s\n' % (extraInfo))
 
                self._updateButtonStates()
-               isPrinting = connection.isPrinting() or connection.isPaused()
-               if isPrinting:
+               onGoingPrint = connection.isPrinting() or connection.isPaused()
+               if onGoingPrint:
                        self.progress.SetValue(connection.getPrintProgress() * 1000)
                else:
                        self.progress.SetValue(0)
@@ -545,11 +545,10 @@ class printWindowBasic(wx.Frame):
                        info += ' Bed: %d' % (self._printerConnection.getBedTemperature())
                info += '\n\n'
                self.statsText.SetLabel(info)
-               if isPrinting != self._isPrinting:
-                       self._isPrinting = isPrinting
+               if onGoingPrint != self._isPrinting:
+                       self._isPrinting = onGoingPrint
                        preventComputerFromSleeping(self, self._isPrinting)
 
-
        def _addTermLog(self, msg):
                pass