chiark / gitweb /
Remove extra comma at the end of the print window title when in error state
[cura.git] / Cura / gui / printWindow.py
index 434d2c0c142c5601d3d7b39529dda4a2a63825ed..a50e06db38dd6ed8283a52e27fc73ca9177836e9 100644 (file)
@@ -403,7 +403,7 @@ class printWindowPlugin(wx.Frame):
                if self._infoText is not None:
                        self._infoText.SetLabel(info)
                else:
-                       self.SetTitle(info.replace('\n', ', '))
+                       self.SetTitle(info.replace('\n', ', ').strip().strip(','))
                if isPrinting != self._isPrinting:
                        self._isPrinting = isPrinting
                        preventComputerFromSleeping(self, self._isPrinting)
@@ -782,9 +782,10 @@ class printWindowAdvanced(wx.Frame):
                self._colorCommandMap[(r, g, b)] = (command, step)
 
        def _moveXYZE(self, motor, step, feedrate):
+               # Prevent Z movement when paused and all moves when printing
                if (not self._printerConnection.hasActiveConnection() or \
                        self._printerConnection.isActiveConnectionOpen()) and \
-                       (not self._printerConnection.isPaused() and \
+                       (not (self._printerConnection.isPaused() and motor == 'Z') and \
                         not self._printerConnection.isPrinting()):
                        self._printerConnection.sendCommand("G91")
                        self._printerConnection.sendCommand("G1 %s%.1f F%d" % (motor, step, feedrate))
@@ -938,7 +939,7 @@ class printWindowAdvanced(wx.Frame):
                        info += 'Temperature: %d' % (self._printerConnection.getTemperature(0))
                if self._printerConnection.getBedTemperature() > 0:
                        info += ' Bed: %d' % (self._printerConnection.getBedTemperature())
-               self.SetTitle(info.replace('\n', ', '))
+               self.SetTitle(info.replace('\n', ', ').strip().strip(','))
                if isPrinting != self._isPrinting:
                        self._isPrinting = isPrinting
                        preventComputerFromSleeping(self, self._isPrinting)
@@ -952,7 +953,7 @@ class TemperatureField(wx.Panel):
 
                self.text = IntCtrl(self, -1)
                self.text.SetBounds(0, 300)
-               self.text.SetSize((60, 25))
+               self.text.SetSize((60, 28))
 
                self.unit = wx.StaticBitmap(self, -1, wx.BitmapFromImage(wx.Image(
                                resources.getPathForImage('print-window-temperature-unit.png'))), (0, 0))
@@ -1002,6 +1003,7 @@ class TemperatureGraph(wx.Panel):
                self._lastDraw = now
                dc = wx.MemoryDC()
                dc.SelectObject(self._backBuffer)
+               dc.SetBackground(wx.Brush(wx.WHITE))
                dc.Clear()
                dc.SetFont(wx.SystemSettings.GetFont(wx.SYS_SYSTEM_FONT))
                w, h = self.GetSizeTuple()