Avoid overwriting item display mode fallback
This commit is contained in:
@@ -300,9 +300,10 @@ public partial class MainWindow : Window
|
||||
: ArgumentsBox.Text.Trim();
|
||||
EnsureAutomaticIconPath();
|
||||
selectedItem.IconPath = string.IsNullOrWhiteSpace(IconPathBox.Text) ? null : IconPathBox.Text.Trim();
|
||||
selectedItem.DisplayMode = ItemDisplayModeBox.SelectedItem is LauncherDisplayMode itemMode
|
||||
? itemMode
|
||||
: controller?.Config.DisplayMode ?? LauncherDisplayMode.LargeIconWithText;
|
||||
if (ItemDisplayModeBox.SelectedItem is LauncherDisplayMode itemMode)
|
||||
{
|
||||
selectedItem.DisplayMode = itemMode;
|
||||
}
|
||||
|
||||
if (selectedItem.Type != LauncherItemType.Menu)
|
||||
{
|
||||
@@ -322,7 +323,7 @@ public partial class MainWindow : Window
|
||||
: HotkeyService.Normalize(HotkeyBox.Text.Trim());
|
||||
controller.Config.DisplayMode = DisplayModeBox.SelectedItem is LauncherDisplayMode mode
|
||||
? mode
|
||||
: LauncherDisplayMode.LargeIconWithText;
|
||||
: LauncherDisplayMode.CompactList;
|
||||
ApplyCurrentItem();
|
||||
}
|
||||
|
||||
@@ -1083,7 +1084,9 @@ public partial class MainWindow : Window
|
||||
Target = TargetBox.Text.Trim(),
|
||||
Arguments = string.IsNullOrWhiteSpace(ArgumentsBox.Text) ? null : ArgumentsBox.Text.Trim(),
|
||||
IconPath = string.IsNullOrWhiteSpace(IconPathBox.Text) ? null : IconPathBox.Text.Trim(),
|
||||
DisplayMode = ItemDisplayModeBox.SelectedItem is LauncherDisplayMode mode ? mode : LauncherDisplayMode.CompactList
|
||||
DisplayMode = ItemDisplayModeBox.SelectedItem is LauncherDisplayMode mode
|
||||
? mode
|
||||
: selectedItem.DisplayMode
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user