From ddc39805c1249f532904738aeadee3fa4e402d75 Mon Sep 17 00:00:00 2001 From: Yuki Matsuzawa Date: Thu, 16 Jul 2026 16:59:30 +0900 Subject: [PATCH 1/7] Add Ion filter clear controls Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .../Model/Search/KeywordFilterModel.cs | 4 ++ .../Model/Search/PeakSpotNavigatorModel.cs | 11 +++++ .../PeakSpotTagSearchQueryBuilderModel.cs | 9 ++++ .../Model/Search/ValueFilterModel.cs | 6 +++ .../View/Lcms/LcmsAnalysisPeakTableView.xaml | 43 ++++++++++++++++++- .../Search/KeywordFilterViewModel.cs | 7 +++ .../Search/PeakSpotNavigatorViewModel.cs | 3 ++ .../PeakSpotTagSearchQueryBuilderViewModel.cs | 9 ++++ .../ViewModel/Search/ValueFilterViewModel.cs | 4 ++ 9 files changed, 94 insertions(+), 2 deletions(-) diff --git a/src/MSDIAL5/MsdialGuiApp/Model/Search/KeywordFilterModel.cs b/src/MSDIAL5/MsdialGuiApp/Model/Search/KeywordFilterModel.cs index 5f6d9799f..d5006b191 100644 --- a/src/MSDIAL5/MsdialGuiApp/Model/Search/KeywordFilterModel.cs +++ b/src/MSDIAL5/MsdialGuiApp/Model/Search/KeywordFilterModel.cs @@ -56,6 +56,10 @@ public async Task SetKeywordsAsync(IEnumerable keywords, CancellationTok } } + public void ClearKeywords() { + SetKeywords(Enumerable.Empty()); + } + private void SetKeywords(IEnumerable keywords) { _keywords.Clear(); _keywords.AddRange(keywords); diff --git a/src/MSDIAL5/MsdialGuiApp/Model/Search/PeakSpotNavigatorModel.cs b/src/MSDIAL5/MsdialGuiApp/Model/Search/PeakSpotNavigatorModel.cs index 491cd1193..81c8df1d4 100644 --- a/src/MSDIAL5/MsdialGuiApp/Model/Search/PeakSpotNavigatorModel.cs +++ b/src/MSDIAL5/MsdialGuiApp/Model/Search/PeakSpotNavigatorModel.cs @@ -46,6 +46,17 @@ public string? SelectedAnnotationLabel { public PeakSpotTagSearchQueryBuilderModel TagSearchQueryBuilder { get; } public ObservableCollection PeakFilters { get; } = new ObservableCollection(); + public void ResetFilters() { + AmplitudeFilterModel.Reset(); + foreach (var valueFilterModel in ValueFilterModels) { + valueFilterModel.Reset(); + } + foreach (var keywordFilterModel in KeywordFilterModels) { + keywordFilterModel.ClearKeywords(); + } + TagSearchQueryBuilder.Reset(); + } + public void RefreshCollectionViews() { foreach (var view in PeakSpotsCollection) { view.Refresh(); diff --git a/src/MSDIAL5/MsdialGuiApp/Model/Search/PeakSpotTagSearchQueryBuilderModel.cs b/src/MSDIAL5/MsdialGuiApp/Model/Search/PeakSpotTagSearchQueryBuilderModel.cs index 834ca5a0d..994d49736 100644 --- a/src/MSDIAL5/MsdialGuiApp/Model/Search/PeakSpotTagSearchQueryBuilderModel.cs +++ b/src/MSDIAL5/MsdialGuiApp/Model/Search/PeakSpotTagSearchQueryBuilderModel.cs @@ -42,6 +42,15 @@ public bool Excludes { } private bool _excludes; + public void Reset() { + Confirmed = false; + LowQualitySpectrum = false; + Misannotation = false; + Coelution = false; + Overannotation = false; + Excludes = false; + } + public PeakSpotTagSearchQuery CreateQuery() { var tags = new List(); if (Confirmed) { diff --git a/src/MSDIAL5/MsdialGuiApp/Model/Search/ValueFilterModel.cs b/src/MSDIAL5/MsdialGuiApp/Model/Search/ValueFilterModel.cs index 307591f02..1c4249b0d 100644 --- a/src/MSDIAL5/MsdialGuiApp/Model/Search/ValueFilterModel.cs +++ b/src/MSDIAL5/MsdialGuiApp/Model/Search/ValueFilterModel.cs @@ -58,6 +58,12 @@ public bool Contains(double value) { return Lower <= value && value <= Upper; } + public void Reset() { + Lower = Minimum; + Upper = Maximum; + IsEnabled = false; + } + public bool IsEnabled { get => _isEnabled; set => SetProperty(ref _isEnabled, value); diff --git a/src/MSDIAL5/MsdialGuiApp/View/Lcms/LcmsAnalysisPeakTableView.xaml b/src/MSDIAL5/MsdialGuiApp/View/Lcms/LcmsAnalysisPeakTableView.xaml index c118b4ab3..2b9a6bd33 100644 --- a/src/MSDIAL5/MsdialGuiApp/View/Lcms/LcmsAnalysisPeakTableView.xaml +++ b/src/MSDIAL5/MsdialGuiApp/View/Lcms/LcmsAnalysisPeakTableView.xaml @@ -87,8 +87,42 @@ - + + + + @@ -128,6 +162,11 @@ Margin="8,0" VerticalAlignment="Center" HorizontalAlignment="Left" Width="128"/> + + diff --git a/src/MSDIAL5/MsdialGuiApp/View/Gcms/GcmsAlignmentSpotTableView.xaml b/src/MSDIAL5/MsdialGuiApp/View/Gcms/GcmsAlignmentSpotTableView.xaml index 780323f44..27880596e 100644 --- a/src/MSDIAL5/MsdialGuiApp/View/Gcms/GcmsAlignmentSpotTableView.xaml +++ b/src/MSDIAL5/MsdialGuiApp/View/Gcms/GcmsAlignmentSpotTableView.xaml @@ -86,8 +86,42 @@ - + + + + diff --git a/src/MSDIAL5/MsdialGuiApp/View/Imms/ImmsAlignmentSpotTableView.xaml b/src/MSDIAL5/MsdialGuiApp/View/Imms/ImmsAlignmentSpotTableView.xaml index d3f2ba21d..e13338751 100644 --- a/src/MSDIAL5/MsdialGuiApp/View/Imms/ImmsAlignmentSpotTableView.xaml +++ b/src/MSDIAL5/MsdialGuiApp/View/Imms/ImmsAlignmentSpotTableView.xaml @@ -86,8 +86,42 @@ - + + + + diff --git a/src/MSDIAL5/MsdialGuiApp/View/Lcimms/LcimmsAlignmentSpotTableView.xaml b/src/MSDIAL5/MsdialGuiApp/View/Lcimms/LcimmsAlignmentSpotTableView.xaml index 2baa8804c..a80751101 100644 --- a/src/MSDIAL5/MsdialGuiApp/View/Lcimms/LcimmsAlignmentSpotTableView.xaml +++ b/src/MSDIAL5/MsdialGuiApp/View/Lcimms/LcimmsAlignmentSpotTableView.xaml @@ -82,8 +82,42 @@ - + + + + diff --git a/src/MSDIAL5/MsdialGuiApp/View/Lcms/LcmsAlignmentSpotTableView.xaml b/src/MSDIAL5/MsdialGuiApp/View/Lcms/LcmsAlignmentSpotTableView.xaml index bec172896..71c350ac3 100644 --- a/src/MSDIAL5/MsdialGuiApp/View/Lcms/LcmsAlignmentSpotTableView.xaml +++ b/src/MSDIAL5/MsdialGuiApp/View/Lcms/LcmsAlignmentSpotTableView.xaml @@ -86,8 +86,42 @@ - + + + + From 53ae73cfac64da99570e69d6478681a9c3d9d665 Mon Sep 17 00:00:00 2001 From: YukiMatsuzawa <122433968+YukiMatsuzawa@users.noreply.github.com> Date: Fri, 17 Jul 2026 11:41:22 +0900 Subject: [PATCH 6/7] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- .../MsdialGuiApp/Model/Search/KeywordFilterModel.cs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/MSDIAL5/MsdialGuiApp/Model/Search/KeywordFilterModel.cs b/src/MSDIAL5/MsdialGuiApp/Model/Search/KeywordFilterModel.cs index 7c5882819..c9d0977f0 100644 --- a/src/MSDIAL5/MsdialGuiApp/Model/Search/KeywordFilterModel.cs +++ b/src/MSDIAL5/MsdialGuiApp/Model/Search/KeywordFilterModel.cs @@ -57,9 +57,15 @@ public async Task SetKeywordsAsync(IEnumerable keywords, CancellationTok } } - public void ClearKeywords() { - SetKeywords([]); - } +public void ClearKeywords() { + _sem.Wait(); + try { + SetKeywords([]); + } + finally { + _sem.Release(); + } +} private void SetKeywords(IEnumerable keywords) { _keywords.Clear(); From 4c6731c936279162b98f8f2b1a13aee62c86950d Mon Sep 17 00:00:00 2001 From: Yuki Matsuzawa Date: Fri, 17 Jul 2026 18:36:33 +0900 Subject: [PATCH 7/7] Add remaining peak table clear controls Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .../View/Dims/DimsAnalysisPeakTableView.xaml | 43 ++++++++++++++++++- .../View/Gcms/GcmsAnalysisPeakTableView.xaml | 43 ++++++++++++++++++- .../View/Imms/ImmsAnalysisPeakTableView.xaml | 43 ++++++++++++++++++- .../Lcimms/LcimmsAnalysisPeakTableView.xaml | 43 ++++++++++++++++++- 4 files changed, 164 insertions(+), 8 deletions(-) diff --git a/src/MSDIAL5/MsdialGuiApp/View/Dims/DimsAnalysisPeakTableView.xaml b/src/MSDIAL5/MsdialGuiApp/View/Dims/DimsAnalysisPeakTableView.xaml index 83d441eb6..3519a3d02 100644 --- a/src/MSDIAL5/MsdialGuiApp/View/Dims/DimsAnalysisPeakTableView.xaml +++ b/src/MSDIAL5/MsdialGuiApp/View/Dims/DimsAnalysisPeakTableView.xaml @@ -87,8 +87,42 @@ - + + + + @@ -128,6 +162,11 @@ Margin="8,0" VerticalAlignment="Center" HorizontalAlignment="Left" Width="128"/> + + @@ -127,6 +161,11 @@ Margin="8,0" VerticalAlignment="Center" HorizontalAlignment="Left" Width="128"/> + + @@ -127,6 +161,11 @@ Margin="8,0" VerticalAlignment="Center" HorizontalAlignment="Left" Width="128"/> + + @@ -123,6 +157,11 @@ Margin="8,0" VerticalAlignment="Center" HorizontalAlignment="Left" Width="128"/> +