Browse Source

Don't display tooltip for hidden control.

If a control was hidden or removed between the time that the tooltip
timer starts and the popup is shown, don't display the tooltip. Fixes
#465.
pull/486/head
Steven Kirk 11 years ago
parent
commit
6e1a56ea4c
  1. 3
      src/Perspex.Controls/ToolTip.cs

3
src/Perspex.Controls/ToolTip.cs

@ -7,6 +7,7 @@ using System.Reactive.Subjects;
using Perspex.Controls.Primitives;
using Perspex.Input;
using Perspex.Threading;
using Perspex.VisualTree;
namespace Perspex.Controls
{
@ -102,7 +103,7 @@ namespace Perspex.Controls
/// <param name="control">The control.</param>
private static void ShowToolTip(Control control)
{
if (control != null)
if (control != null && control.IsVisible && control.GetVisualRoot() != null)
{
if (s_popup == null)
{

Loading…
Cancel
Save