diff options
author | Vsevolod Kukol <sevoku@microsoft.com> | 2017-03-07 18:40:29 +0300 |
---|---|---|
committer | Vsevolod Kukol <sevoku@microsoft.com> | 2017-03-09 13:31:18 +0300 |
commit | d226089f8dfb6c48e72422544f9cdc2da3276a02 (patch) | |
tree | a389b4ddf4edae5b4b4f2a2295cb0ae71f6a21ff /main/src/core/MonoDevelop.Ide/MonoDevelop.Components/InformationPopoverWidget.cs | |
parent | a0841a635afbb1b03559a25df7d86e409b9bb9bf (diff) |
[Ide] Fix InformationPopoverWidget Popover
* Fix initial popover position
* Correctly Dispose the Popover
Diffstat (limited to 'main/src/core/MonoDevelop.Ide/MonoDevelop.Components/InformationPopoverWidget.cs')
-rw-r--r-- | main/src/core/MonoDevelop.Ide/MonoDevelop.Components/InformationPopoverWidget.cs | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/InformationPopoverWidget.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/InformationPopoverWidget.cs index 1c10a4fba7..12f8bc7359 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/InformationPopoverWidget.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/InformationPopoverWidget.cs @@ -36,7 +36,7 @@ namespace MonoDevelop.Components Xwt.ImageView imageView; string message; TooltipPopoverWindow popover; - PopupPosition popupPosition; + PopupPosition popupPosition = PopupPosition.Top; public InformationPopoverWidget () { @@ -119,11 +119,23 @@ namespace MonoDevelop.Components protected override void OnMouseExited (EventArgs args) { base.OnMouseExited (args); + DestroyPopover (); + } + + void DestroyPopover () + { if (popover != null) { popover.Destroy (); popover = null; } } + + protected override void Dispose (bool disposing) + { + if (disposing) + DestroyPopover (); + base.Dispose (disposing); + } } } |