Browse Source

fix list clear getting saved to settings & add chagenlog

pull/438/head
JT 10 months ago
parent
commit
bd8d028c89
  1. 2
      CHANGELOG.md
  2. 18
      StabilityMatrix.Avalonia/ViewModels/CheckpointsPageViewModel.cs

2
CHANGELOG.md

@ -8,6 +8,8 @@ and this project adheres to [Semantic Versioning 2.0](https://semver.org/spec/v2
## v2.8.0-pre.1 ## v2.8.0-pre.1
### Added ### Added
- Added base model filter to Checkpoints page - Added base model filter to Checkpoints page
- Search box on Checkpoints page now searches tags and trigger words
- Added "Compatible Images" category when selecting images for Inference projects
### Fixed ### Fixed
- Inference file name patterns with directory separator characters will now have the subdirectories created automatically - Inference file name patterns with directory separator characters will now have the subdirectories created automatically
- Fixed missing up/downgrade buttons on the Python Packages dialog when the version was not semver compatible - Fixed missing up/downgrade buttons on the Python Packages dialog when the version was not semver compatible

18
StabilityMatrix.Avalonia/ViewModels/CheckpointsPageViewModel.cs

@ -103,6 +103,8 @@ public partial class CheckpointsPageViewModel : PageViewModelBase
? Resources.Action_ClearSelection ? Resources.Action_ClearSelection
: Resources.Action_SelectAll; : Resources.Action_SelectAll;
private bool isClearing = false;
public CheckpointsPageViewModel( public CheckpointsPageViewModel(
ISharedFolders sharedFolders, ISharedFolders sharedFolders,
ISettingsManager settingsManager, ISettingsManager settingsManager,
@ -129,9 +131,12 @@ public partial class CheckpointsPageViewModel : PageViewModelBase
CheckpointFoldersCache.Refresh(); CheckpointFoldersCache.Refresh();
OnPropertyChanged(nameof(ClearButtonText)); OnPropertyChanged(nameof(ClearButtonText));
settingsManager.Transaction( if (!isClearing)
settings => settings.SelectedBaseModels = SelectedBaseModels.ToList() {
); settingsManager.Transaction(
settings => settings.SelectedBaseModels = SelectedBaseModels.ToList()
);
}
}; };
CheckpointFoldersCache CheckpointFoldersCache
@ -173,7 +178,10 @@ public partial class CheckpointsPageViewModel : PageViewModelBase
IsLoading = false; IsLoading = false;
IsIndexing = false; IsIndexing = false;
isClearing = true;
SelectedBaseModels.Clear(); SelectedBaseModels.Clear();
isClearing = false;
SelectedBaseModels.AddRange(settingsManager.Settings.SelectedBaseModels); SelectedBaseModels.AddRange(settingsManager.Settings.SelectedBaseModels);
Logger.Info($"OnLoadedAsync in {sw.ElapsedMilliseconds}ms"); Logger.Info($"OnLoadedAsync in {sw.ElapsedMilliseconds}ms");
@ -234,6 +242,10 @@ public partial class CheckpointsPageViewModel : PageViewModelBase
|| x.ConnectedModel?.Tags.Any( || x.ConnectedModel?.Tags.Any(
t => t.Contains(SearchFilter, StringComparison.OrdinalIgnoreCase) t => t.Contains(SearchFilter, StringComparison.OrdinalIgnoreCase)
) == true ) == true
|| x.ConnectedModel?.TrainedWordsString.Contains(
SearchFilter,
StringComparison.OrdinalIgnoreCase
) == true
) )
|| ||
// If no matching files were found in the current folder, check in all subfolders // If no matching files were found in the current folder, check in all subfolders

Loading…
Cancel
Save