mirror of
https://github.com/rbalsleyMSFT/FFU.git
synced 2026-06-14 02:09:35 -06:00
Improve driver list data handling and filtering
Refactors the driver selection UI to enhance stability and performance by changing how the underlying data source is managed. Creating and re-assigning a new list when data changes, rather than modifying the bound collection in-place, prevents UI inconsistency errors. - Updates the model search to use the native WPF `CollectionView.Filter` for more efficient and reliable filtering. - Fixes an issue where HTML entities were not decoded in Microsoft driver model names. - Ensures selected drivers from one manufacturer are preserved when fetching models for another. - Centralizes driver-related button event handlers into the core initialization module.
This commit is contained in:
@@ -169,19 +169,6 @@ $window.Add_Loaded({
|
||||
$script:uiState.Controls.spModelFilterSection.Visibility = 'Collapsed'
|
||||
$script:uiState.Controls.lstDriverModels.Visibility = 'Collapsed'
|
||||
$script:uiState.Controls.spDriverActionButtons.Visibility = 'Collapsed'
|
||||
$script:uiState.Controls.btnClearDriverList.Add_Click({
|
||||
$script:uiState.Controls.lstDriverModels.ItemsSource = $null
|
||||
$script:uiState.Data.allDriverModels = @()
|
||||
$script:uiState.Controls.txtModelFilter.Text = ""
|
||||
$script:uiState.Controls.txtStatus.Text = "Driver list cleared."
|
||||
})
|
||||
$script:uiState.Controls.btnSaveDriversJson.Add_Click({
|
||||
Save-DriversJson -State $script:uiState
|
||||
})
|
||||
$script:uiState.Controls.btnImportDriversJson.Add_Click({
|
||||
Import-DriversJson -State $script:uiState
|
||||
})
|
||||
|
||||
# Office interplay (Keep existing logic)
|
||||
$script:uiState.Flags.installAppsCheckedByOffice = $false
|
||||
if ($script:uiState.Controls.chkInstallOffice.IsChecked) {
|
||||
|
||||
Reference in New Issue
Block a user