mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-04 18:26:39 +02:00
[ColorPicker][Settings]Fix duplicate name crash and cleanup (#28713)
This commit is contained in:
committed by
GitHub
parent
8d5aa9fe6c
commit
b24ae12c5a
@@ -300,13 +300,16 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
||||
|
||||
UpdateColorFormats();
|
||||
UpdateColorFormatPreview();
|
||||
ScheduleSavingOfSettings();
|
||||
}
|
||||
|
||||
private void ColorFormat_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
|
||||
{
|
||||
UpdateColorFormats();
|
||||
ScheduleSavingOfSettings();
|
||||
// Remaining properties are handled by the collection and by the dialog
|
||||
if (e.PropertyName == nameof(ColorFormatModel.IsShown))
|
||||
{
|
||||
UpdateColorFormats();
|
||||
ScheduleSavingOfSettings();
|
||||
}
|
||||
}
|
||||
|
||||
private void ScheduleSavingOfSettings()
|
||||
@@ -437,6 +440,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
||||
SelectedColorRepresentationValue = colorFormat.Name; // name might be changed by the user
|
||||
}
|
||||
|
||||
UpdateColorFormats();
|
||||
UpdateColorFormatPreview();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user