fix awre crash and missing participant gui update

This commit is contained in:
andynoack
2017-01-19 11:41:59 +01:00
parent a5805c56db
commit 809b3c28ee
2 changed files with 3 additions and 2 deletions

View File

@@ -96,11 +96,11 @@ class Length(Component):
for message_type, intervals in common_intervals_by_type.items():
assert isinstance(message_type, MessageType)
# Exclude Synchronization (or preamble if not present) from length calculation
sync_lbl = next((lbl for lbl in message_type if lbl.type.function == FieldType.Function.SYNC), None)
sync_lbl = next((lbl for lbl in message_type if lbl.type and lbl.type.function == FieldType.Function.SYNC), None)
if sync_lbl:
sync_len = self.__nbits2bytes(sync_lbl.end)
else:
preamble_lbl = next((lbl for lbl in message_type if lbl.type.function == FieldType.Function.PREAMBLE), None)
preamble_lbl = next((lbl for lbl in message_type if lbl.type and lbl.type.function == FieldType.Function.PREAMBLE), None)
sync_len = self.__nbits2bytes(preamble_lbl.end) if preamble_lbl is not None else 0
scores = defaultdict(int)

View File

@@ -699,6 +699,7 @@ class MainController(QMainWindow):
def on_project_updated(self):
self.participant_legend_model.participants = self.project_manager.participants
self.participant_legend_model.update()
self.compare_frame_controller.refresh()
self.ui.textEditProjectDescription.setText(self.project_manager.description)
def on_textEditProjectDescription_edited(self):