diff options
author | Michael Hutchinson <m.j.hutchinson@gmail.com> | 2012-01-28 00:41:25 +0400 |
---|---|---|
committer | Michael Hutchinson <m.j.hutchinson@gmail.com> | 2012-01-28 00:43:06 +0400 |
commit | d8613ded200450b1061091bdff2437cdb0f24a3c (patch) | |
tree | f8133df169a73b16f853acd34d10bf3d4ae8c5be /main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Extensions | |
parent | cfb95fefd292a7d2069f077802569a6c53366542 (diff) |
[Ide,Mac] Fix race in cancellation of dialogs
Diffstat (limited to 'main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Extensions')
-rw-r--r-- | main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Extensions/AlertDialog.cs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Extensions/AlertDialog.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Extensions/AlertDialog.cs index 7373d79a72..c1158c1ee8 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Extensions/AlertDialog.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Extensions/AlertDialog.cs @@ -93,11 +93,12 @@ namespace MonoDevelop.Components.Extensions }); } - MessageService.ShowCustomDialog (alertDialog, data.TransientFor); - if (alertDialog.ApplyToAll) - data.ApplyToAll = true; - data.ResultButton = alertDialog.ResultButton; - + if (!data.Message.CancellationToken.IsCancellationRequested) { + MessageService.ShowCustomDialog (alertDialog, data.TransientFor); + if (alertDialog.ApplyToAll) + data.ApplyToAll = true; + data.ResultButton = alertDialog.ResultButton; + } alertDialog = null; if (data.ResultButton == null || data.Message.CancellationToken.IsCancellationRequested) { |