diff options
author | Matt Ward <matt.ward@xamarin.com> | 2017-04-24 13:54:20 +0300 |
---|---|---|
committer | Matt Ward <matt.ward@xamarin.com> | 2017-04-24 14:12:21 +0300 |
commit | 526bd531bcaeb6958a2b46e36023ca964cb74c77 (patch) | |
tree | 67f7d026a9481299560ab98ddec87d46d406ecda /main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui | |
parent | bb85b552e19cff27de0be2a3b41ea0aa26514395 (diff) |
[Ide] New project dialog not displayed when modified file saved
Fixed bug #55457 - Issue when trying to create a new project while a
file has changes
https://bugzilla.xamarin.com/show_bug.cgi?id=55457
With a file modified and open in the text editor, selecting New
Solution shows a dialog asking to save the modified file. Clicking the
Save button would then not open the New Project dialog. The problem
was that the Document.Save method returns a task and the code
was checking the Document's IsDirty property before the save
completed which prevented the New Project dialog from being opened.
Diffstat (limited to 'main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui')
-rw-r--r-- | main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Workbench.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Workbench.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Workbench.cs index 00cf7fc05c..509e56c695 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Workbench.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Workbench.cs @@ -358,7 +358,7 @@ namespace MonoDevelop.Ide.Gui } } - internal bool SaveAllDirtyFiles () + internal async Task<bool> SaveAllDirtyFiles () { Document[] docs = Documents.Where (doc => doc.IsDirty && doc.Window.ViewContent != null).ToArray (); if (!docs.Any ()) @@ -369,7 +369,7 @@ namespace MonoDevelop.Ide.Gui if (result == AlertButton.Cancel) return false; - doc.Save (); + await doc.Save (); if (doc.IsDirty) { doc.Select (); return false; |