diff options
author | Marius Ungureanu <marius.ungureanu@xamarin.com> | 2015-06-17 00:13:34 +0300 |
---|---|---|
committer | Marius Ungureanu <marius.ungureanu@xamarin.com> | 2015-06-17 00:40:42 +0300 |
commit | be00174229b0115a88688e639171a98381b20cf8 (patch) | |
tree | 86634eeb9abaa2aa3512cb5f94652ec8a76bdb1d /main/src/addins/MonoDevelop.SourceEditor2 | |
parent | fc3170531a206bddcf4e6011cccfe4a879fa30fa (diff) |
[Misc] 1/4 batch of checking disposes of dialogs.
Diffstat (limited to 'main/src/addins/MonoDevelop.SourceEditor2')
-rw-r--r-- | main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.OptionPanels/HighlightingPanel.cs | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.OptionPanels/HighlightingPanel.cs b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.OptionPanels/HighlightingPanel.cs index 350d80757c..621ced902e 100644 --- a/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.OptionPanels/HighlightingPanel.cs +++ b/main/src/addins/MonoDevelop.SourceEditor2/MonoDevelop.SourceEditor.OptionPanels/HighlightingPanel.cs @@ -84,8 +84,9 @@ namespace MonoDevelop.SourceEditor.OptionPanels void HandleButtonNewClicked (object sender, EventArgs e) { - var newShemeDialog = new NewColorShemeDialog (); - MessageService.ShowCustomDialog (newShemeDialog, dialog); + using (var newShemeDialog = new NewColorShemeDialog ()) { + MessageService.ShowCustomDialog (newShemeDialog, dialog); + } ShowStyles (); } @@ -114,10 +115,11 @@ namespace MonoDevelop.SourceEditor.OptionPanels { TreeIter selectedIter; if (styleTreeview.Selection.GetSelected (out selectedIter)) { - var editor = new ColorShemeEditor (this); - var colorScheme = (Mono.TextEditor.Highlighting.ColorScheme)this.styleStore.GetValue (selectedIter, 1); - editor.SetSheme (colorScheme); - MessageService.ShowCustomDialog (editor, dialog); + using (var editor = new ColorShemeEditor (this)) { + var colorScheme = (Mono.TextEditor.Highlighting.ColorScheme)this.styleStore.GetValue (selectedIter, 1); + editor.SetSheme (colorScheme); + MessageService.ShowCustomDialog (editor, dialog); + } } } |