Don't show tooltips if the mouse cursor is outside the control

This commit is contained in:
baldurk
2016-11-14 11:31:36 +01:00
parent 0c73240f8f
commit 73899fc307
@@ -228,11 +228,22 @@ namespace TreelistView
{
m_tooltipTimer.Stop();
if(m_tooltipNode == null)
if (m_tooltipNode == null)
{
m_tooltip.Hide(this);
return;
}
Node node = m_tooltipNode;
Point p = PointToClient(Cursor.Position);
if (!ClientRectangle.Contains(p))
{
m_tooltip.Hide(this);
return;
}
int visibleRowIndex = CalcHitRow(PointToClient(Cursor.Position));
Rectangle rowRect = CalcRowRectangle(visibleRowIndex);