Skip to content

Commit

Permalink
Don't show the settings window if /R switch is specified
Browse files Browse the repository at this point in the history
  • Loading branch information
chelh committed Mar 26, 2017
1 parent b7ac38c commit f33dae6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/VBASync/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ private void Application_Startup(object sender, StartupEventArgs e)
}
var mw = new WPF.MainWindow(initialSession);
mw.Show();
if (!File.Exists(lastSessionPath))
if (!File.Exists(lastSessionPath) && !initialSession.AutoRun)
{
mw.SettingsMenu_Click(null, null);
}
Expand Down
7 changes: 2 additions & 5 deletions src/VBASync/View/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -304,11 +304,8 @@ private void Window_Closed(object sender, EventArgs e) {
private void Window_Loaded(object sender, RoutedEventArgs e) {
QuietRefreshIfInputsOk();

if (!string.IsNullOrEmpty(_vm.FolderPath) && !string.IsNullOrEmpty(_vm.FilePath)) {
RefreshButton_Click(null, null);
if (_vm.AutoRun) {
OkButton_Click(null, null);
}
if (_vm.AutoRun) {
OkButton_Click(null, null);
}
}
}
Expand Down

0 comments on commit f33dae6

Please sign in to comment.