diff options
3 files changed, 14 insertions, 3 deletions
diff --git a/win/CS/HandBrakeWPF/Commands/OpenOptionsScreenCommand.cs b/win/CS/HandBrakeWPF/Commands/OpenOptionsScreenCommand.cs index 5bfbb22d7..238e6655f 100644 --- a/win/CS/HandBrakeWPF/Commands/OpenOptionsScreenCommand.cs +++ b/win/CS/HandBrakeWPF/Commands/OpenOptionsScreenCommand.cs @@ -50,11 +50,17 @@ namespace HandBrakeWPF.Commands public void Execute(object parameter)
{
var shellViewModel = IoC.Get<IShellViewModel>();
+ var optionsViewModel = IoC.Get<IOptionsViewModel>();
+
shellViewModel.DisplayWindow(ShellWindow.OptionsWindow);
+ if (parameter == null && optionsViewModel.SelectedTab == OptionsTab.About)
+ {
+ optionsViewModel.GotoTab(OptionsTab.General);
+ }
+
if (parameter != null && parameter.GetType() == typeof(OptionsTab))
{
- var optionsViewModel = IoC.Get<IOptionsViewModel>();
optionsViewModel.GotoTab((OptionsTab)parameter);
}
}
diff --git a/win/CS/HandBrakeWPF/ViewModels/Interfaces/IOptionsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/Interfaces/IOptionsViewModel.cs index e37f1da07..827d0a0fb 100644 --- a/win/CS/HandBrakeWPF/ViewModels/Interfaces/IOptionsViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/Interfaces/IOptionsViewModel.cs @@ -17,6 +17,11 @@ namespace HandBrakeWPF.ViewModels.Interfaces public interface IOptionsViewModel
{
/// <summary>
+ /// The currently selected Tab in the options pane.
+ /// </summary>
+ OptionsTab SelectedTab { get; }
+
+ /// <summary>
/// The goto tab.
/// </summary>
/// <param name="tab">
diff --git a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs index 47a34e4e8..a41fb01dc 100644 --- a/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/MainViewModel.cs @@ -1368,8 +1368,8 @@ namespace HandBrakeWPF.ViewModels /// </summary>
public void OpenOptionsWindow()
{
- IShellViewModel shellViewModel = IoC.Get<IShellViewModel>();
- shellViewModel.DisplayWindow(ShellWindow.OptionsWindow);
+ OpenOptionsScreenCommand command = new OpenOptionsScreenCommand();
+ command.Execute(null);
}
/// <summary>
|