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. 12
      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
### Added
- 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
- 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

12
StabilityMatrix.Avalonia/ViewModels/CheckpointsPageViewModel.cs

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

Loading…
Cancel
Save