Fix import/export functionality (#4131)

* fix: cast selections to string to prevent PSCustomObject type issues

* fix(presets): clear existing selections before importing to replace state instead of merging

* refactor(impex): warn user when exporting empty selections or importing empty config
This commit is contained in:
Eren
2026-03-02 22:02:48 +03:00
committed by GitHub
parent 58dacd5b0b
commit 3fb5c04693
4 changed files with 37 additions and 14 deletions

View File

@@ -38,7 +38,7 @@ function Invoke-WPFSelectedCheckboxesUpdate{
if (!$sync.selectedApps.Contains($appKey)) {
$sync.selectedApps.Add($appKey)
# The List type needs to be specified again, because otherwise Sort-Object will convert the list to a string if there is only a single entry
[System.Collections.Generic.List[pscustomobject]]$sync.selectedApps = $sync.SelectedApps | Sort-Object
[System.Collections.Generic.List[string]]$sync.selectedApps = $sync.SelectedApps | Sort-Object
}
}
else{