Skip to content

Commit

Permalink
Card 108: Change Spade to listen for settings load (vs. save) to refr…
Browse files Browse the repository at this point in the history
…esh its settings. Now that we use disk-based mechanisms more heavily, load operations are more logically available during reset/import/save.
  • Loading branch information
codecadwallader committed Jul 8, 2015
1 parent 1e13c75 commit 23311c1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CodeMaid/UI/Dialogs/Options/OptionsViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ private void OnPagePropertyChanged(object sender, PropertyChangedEventArgs e)
/// Refreshes the default/package settings which are used throughout CodeMaid.
/// </summary>
/// <remarks>
/// Reload is followed by a Save to trigger external event listeners.
/// Reload is followed by a Save to maintain the presence of a file even when empty.
/// </remarks>
private void RefreshPackageSettings()
{
Expand Down
6 changes: 3 additions & 3 deletions CodeMaid/UI/ToolWindows/Spade/SpadeToolWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public SpadeToolWindow()
base.Content = new SpadeView { DataContext = _viewModel };

// Register for changes to settings.
Settings.Default.SettingsSaving += (sender, args) => OnSettingsSave();
Settings.Default.SettingsLoaded += (sender, args) => OnSettingsLoad();
}

#endregion Constructors
Expand Down Expand Up @@ -277,9 +277,9 @@ private void OnCodeModelBuilt(CodeModel codeModel)
}

/// <summary>
/// An event handler called when settings are saved.
/// An event handler called when settings are loaded.
/// </summary>
private void OnSettingsSave()
private void OnSettingsLoad()
{
_viewModel.SortOrder = (CodeSortOrder)Settings.Default.Digging_PrimarySortOrder;
Refresh();
Expand Down

0 comments on commit 23311c1

Please sign in to comment.