Persist selected item display mode changes
This commit is contained in:
@@ -114,6 +114,11 @@ public partial class MainWindow : Window
|
||||
|
||||
private void ItemsTree_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
|
||||
{
|
||||
if (!isLoadingSelection && selectedItem is not null)
|
||||
{
|
||||
ApplyCurrentItem();
|
||||
}
|
||||
|
||||
if (e.NewValue is not TreeViewItem treeItem || treeItem.Tag is not LauncherItem item)
|
||||
{
|
||||
selectedItem = null;
|
||||
@@ -946,6 +951,23 @@ public partial class MainWindow : Window
|
||||
}
|
||||
}
|
||||
|
||||
private void ItemDisplayModeBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
{
|
||||
if (isLoadingSelection)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (selectedItem is not null && ItemDisplayModeBox.SelectedItem is LauncherDisplayMode itemMode)
|
||||
{
|
||||
selectedItem.DisplayMode = itemMode;
|
||||
selectedPath = FindItemPath(selectedItem);
|
||||
StatusText.Text = "Click Save to keep the selected item display mode.";
|
||||
}
|
||||
|
||||
UpdatePreview();
|
||||
}
|
||||
|
||||
private void EnsureAutomaticIconPath()
|
||||
{
|
||||
if (TypeBox.SelectedItem is LauncherItemType.Menu)
|
||||
|
||||
Reference in New Issue
Block a user