From: Youness Alaoui Date: Fri, 22 May 2015 21:51:53 +0000 (-0400) Subject: Fix an issue where the UI state wasn't being updated X-Git-Tag: lulzbot-15.02.1-1.01~16 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=1706653b596c273cf425e6758251eb0771bcef28;p=cura.git Fix an issue where the UI state wasn't being updated This could happen if you pause a print within 500ms from a gcode command being executed on the serial com. The update was ignored and if we paused we may never get another callback update so the UI would never get updated. This could also happen when we just open the UI and we see the temperature values appear meaning the connection was successful, but it doesn't say Operational and the Print button is disabled for about 5 seconds (the next temperature update). --- diff --git a/Cura/gui/printWindow.py b/Cura/gui/printWindow.py index 43552374..e3e5eadb 100644 --- a/Cura/gui/printWindow.py +++ b/Cura/gui/printWindow.py @@ -374,7 +374,7 @@ class printWindowPlugin(wx.Frame): return self._lastUpdateTime = t - if extraInfo is not None: + if extraInfo is not None and len(extraInfo) > 0: self._addTermLog('< %s\n' % (extraInfo)) self._updateButtonStates() @@ -522,7 +522,7 @@ class printWindowBasic(wx.Frame): return self._lastUpdateTime = t - if extraInfo is not None: + if extraInfo is not None and len(extraInfo) > 0: self._addTermLog('< %s\n' % (extraInfo)) self._updateButtonStates() diff --git a/Cura/util/printerConnection/serialConnection.py b/Cura/util/printerConnection/serialConnection.py index 2c8d8292..6a2c2548 100644 --- a/Cura/util/printerConnection/serialConnection.py +++ b/Cura/util/printerConnection/serialConnection.py @@ -222,7 +222,7 @@ class serialConnection(printerConnectionBase.printerConnectionBase): line = line[1].split(':', 1) self._commState = int(line[0]) self._commStateString = line[1] - self._doCallback() + self._doCallback('') elif line[0] == 'progress': self._printProgress = int(line[1]) self._doCallback()