Commit 12b401a3 authored by Guillaume Seguin's avatar Guillaume Seguin

Append text to logbox before clipping

parent a0ece571
......@@ -1400,11 +1400,11 @@ Printrun. If not, see <http://www.gnu.org/licenses/>."""
def addtexttolog(self, text):
try:
self.logbox.AppendText(text)
max_length = 20000
current_length = self.logbox.GetLastPosition()
if current_length > max_length:
self.logbox.Remove(0, current_length / 10)
self.logbox.AppendText(text)
except:
print _("Attempted to write invalid text to console, which could be due to an invalid baudrate")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment