diff --git a/src/urh/awre/components/Length.py b/src/urh/awre/components/Length.py index 35a0194f..db27712c 100644 --- a/src/urh/awre/components/Length.py +++ b/src/urh/awre/components/Length.py @@ -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) diff --git a/src/urh/controller/MainController.py b/src/urh/controller/MainController.py index 2dd3e148..5db96275 100644 --- a/src/urh/controller/MainController.py +++ b/src/urh/controller/MainController.py @@ -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):