From b6e779e52376a24ea392cf98ca104a5f2af9e12d Mon Sep 17 00:00:00 2001 From: cxnt Date: Tue, 27 Aug 2024 19:04:00 +0400 Subject: [PATCH] Fix all datasets checkbox in the input project layers and save project name in settings in OutputProject Layer --- .../input/images_project/layout/src_input_data.py | 3 ++- .../input/videos_project/layout/src_input_data.py | 3 ++- .../dtl/actions/output/output_project/output_project.py | 9 +++++++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/ui/dtl/actions/input/images_project/layout/src_input_data.py b/src/ui/dtl/actions/input/images_project/layout/src_input_data.py index 923cc4ba..6d409c44 100644 --- a/src/ui/dtl/actions/input/images_project/layout/src_input_data.py +++ b/src/ui/dtl/actions/input/images_project/layout/src_input_data.py @@ -25,13 +25,14 @@ def create_input_data_selector_widgets(): src_input_data_sidebar_dataset_selector = SelectDatasetTree( multiselect=True, flat=True, - select_all_datasets=True, + select_all_datasets=False, allowed_project_types=[ProjectType.IMAGES], always_open=False, compact=False, team_is_selectable=False, workspace_is_selectable=False, append_to_body=False, + show_select_all_datasets_checkbox=True, ) src_input_data_sidebar_save_btn = create_save_btn() diff --git a/src/ui/dtl/actions/input/videos_project/layout/src_input_data.py b/src/ui/dtl/actions/input/videos_project/layout/src_input_data.py index c8c7011f..efe71018 100644 --- a/src/ui/dtl/actions/input/videos_project/layout/src_input_data.py +++ b/src/ui/dtl/actions/input/videos_project/layout/src_input_data.py @@ -25,13 +25,14 @@ def create_input_data_selector_widgets(): src_input_data_sidebar_dataset_selector = SelectDatasetTree( multiselect=True, flat=True, - select_all_datasets=True, + select_all_datasets=False, allowed_project_types=[ProjectType.VIDEOS], always_open=False, compact=False, team_is_selectable=False, workspace_is_selectable=False, append_to_body=False, + show_select_all_datasets_checkbox=True, ) src_input_data_sidebar_save_btn = create_save_btn() diff --git a/src/ui/dtl/actions/output/output_project/output_project.py b/src/ui/dtl/actions/output/output_project/output_project.py index aa938369..dcfcc12c 100644 --- a/src/ui/dtl/actions/output/output_project/output_project.py +++ b/src/ui/dtl/actions/output/output_project/output_project.py @@ -122,6 +122,15 @@ def _update_preview(): def get_settings(options_json: dict): nonlocal saved_settings + if not is_existing_project.is_checked(): + settings = { + "project_name": new_project_name_input.get_value(), + "dataset_option": None, + "dataset_name": None, + "dataset_id": None, + "merge_different_meta": False, + } + saved_settings = settings return { **saved_settings, "is_existing_project": is_existing_project.is_checked(),