From 7bc024f9628efe66bb243596c0419b5440453cd2 Mon Sep 17 00:00:00 2001 From: almaz Date: Thu, 29 Aug 2024 15:27:58 +0200 Subject: [PATCH] update ui --- src/main.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/main.py b/src/main.py index b816889..d8a55d2 100644 --- a/src/main.py +++ b/src/main.py @@ -140,6 +140,8 @@ def main_func(): def handle_selectors(active: bool): no_classes_label.hide() + selected_matched_text.hide() + not_matched_text.hide() # select_classes.hide() # not_matched_classes.hide() if active: @@ -148,14 +150,17 @@ def handle_selectors(active: bool): _, not_matched_model = not_matched g.selected_classes = [obj_cls.name for obj_cls in matched_model] - not_matched_classes = len(not_matched_model) + not_matched_classes_cnt = len(not_matched_model) total_classes = len(matched_model) + len(not_matched_model) - total_classes_text.text = f"{total_classes} total classes available in the model." + total_classes_text.text = f"{total_classes} classes found in the model." selected_matched_text.text = f"{len(matched_model)} classes can be used for evaluation." - not_matched_text.text = f"{not_matched_classes} classes are not available for evaluation (not found in the GT project)." + not_matched_text.text = f"{not_matched_classes_cnt} classes are not available for evaluation (not found in the GT project or have different geometry type)." if len(matched_model) > 0: + selected_matched_text.show() + if not_matched_classes_cnt > 0: + not_matched_text.show() button.enable() return else: