diff --git a/src/PlanViewer.App/Controls/QuerySessionControl.Format.cs b/src/PlanViewer.App/Controls/QuerySessionControl.Format.cs index 9ead789..eea3f84 100644 --- a/src/PlanViewer.App/Controls/QuerySessionControl.Format.cs +++ b/src/PlanViewer.App/Controls/QuerySessionControl.Format.cs @@ -86,9 +86,7 @@ private async void Format_Click(object? sender, RoutedEventArgs e) try { - var settings = SqlFormatSettingsService.Load(out var loadError); - if (loadError != null) - SetStatus("Warning: using default format settings (load failed)"); + var settings = AppSettingsService.Load().FormatOptions ?? new SqlFormatSettings(); var (formatted, errors) = await Task.Run(() => SqlFormattingService.Format(sql, settings)); @@ -150,10 +148,4 @@ private async void Format_Click(object? sender, RoutedEventArgs e) FormatButton.IsEnabled = true; } } - - private void FormatOptions_Click(object? sender, RoutedEventArgs e) - { - var dialog = new Dialogs.FormatOptionsWindow(); - dialog.ShowDialog(GetParentWindow()); - } } diff --git a/src/PlanViewer.App/Controls/QuerySessionControl.axaml b/src/PlanViewer.App/Controls/QuerySessionControl.axaml index a9aefad..f651f35 100644 --- a/src/PlanViewer.App/Controls/QuerySessionControl.axaml +++ b/src/PlanViewer.App/Controls/QuerySessionControl.axaml @@ -92,10 +92,6 @@ Height="28" Padding="10,0" FontSize="12" Theme="{StaticResource AppButton}" ToolTip.Tip="Format the SQL query"/> -