node_manager_fkie: fixed clear in echo dialog
@@ -287,6 +287,7 @@ class EchoDialog(QDialog):
except ValueError:
self.maxLenStringComboBox.setEditText(str(self.line_limit))
self.display.clear()
+ with self.lock:
for msg, current_time in self._msgs:
self._append_message(msg, self._latched, current_time, False)
@@ -297,6 +298,7 @@ class EchoDialog(QDialog):
self.digits_after_in_array = None
self.maxDigitsComboBox.setEditText('')
self.display.clear()
+ with self.lock:
for msg, current_time in self._msgs:
self._append_message(msg, self._latched, current_time, False)
@@ -311,6 +313,7 @@ class EchoDialog(QDialog):
self.chars_limit = 0
self.receiving_hz = 0
self.display.clear()
+ with self.lock:
for msg, current_time in self._msgs:
self._append_message(msg, self._latched, current_time, False)
@@ -326,6 +329,7 @@ class EchoDialog(QDialog):
self.maxLenComboBox.setEditText(str(self.chars_limit))
if update_display:
self.display.clear()
+ with self.lock:
for msg, current_time in self._msgs:
self._append_message(msg, self._latched, current_time, False)
@@ -341,6 +345,7 @@ class EchoDialog(QDialog):
self.maxHzComboBox.setEditText(str(self.receiving_hz))
if update_display:
self.display.clear()
+ with self.lock:
for msg, current_time in self._msgs:
self._append_message(msg, self._latched, current_time, False)
@@ -354,6 +359,7 @@ class EchoDialog(QDialog):
def on_clear_btn_clicked(self):
self.display.clear()
with self.lock:
+ del self._msgs[:]
self.message_count = 0
self._scrapped_msgs = 0
del self.times[:]
@@ -393,6 +399,7 @@ class EchoDialog(QDialog):
current_time = time.time()
self._latched = latched
if store:
+ with self.lock:
self._msgs.append((msg, current_time))
if len(self._msgs) > 25:
self._msgs.pop()
