Fixed bug in LogViewer when no Log Messages are available when first SetLogCounters
authorLaurent Bessard
Tue, 30 Apr 2013 00:33:09 +0200
changeset 1079 6c8dfc4fc23b
parent 1078 f0ea86d830ed
child 1080 5ec20f56b1d2
Fixed bug in LogViewer when no Log Messages are available when first SetLogCounters
controls/LogViewer.py
--- a/controls/LogViewer.py	Mon Apr 29 10:35:15 2013 +0200
+++ b/controls/LogViewer.py	Tue Apr 30 00:33:09 2013 +0200
@@ -408,10 +408,8 @@
                                 new_messages = [new_message]
                         else:
                             new_messages.insert(0, new_message)
-                    else:
-                        if prev is None:
-                            self.OldestMessages.append((-1, None))
-                        break
+                if prev is None and len(self.OldestMessages) <= level:
+                    self.OldestMessages.append((-1, None))
                 self.previous_log_count[level] = count
         new_messages.sort()
         if len(new_messages) > 0: