More tooltip handling

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16129 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
David Webster
2002-07-10 05:47:43 +00:00
parent dd56228c02
commit ff5802f399
3 changed files with 9 additions and 10 deletions

View File

@@ -928,11 +928,6 @@ void wxToolBar::OnMouseEvent(
if (!pTool)
{
m_vToolTimer.Stop();
if (m_pToolTip)
{
delete m_pToolTip;
m_pToolTip = NULL;
}
if (m_nCurrentTool > -1)
{
if (rEvent.LeftIsDown())
@@ -976,6 +971,8 @@ void wxToolBar::OnMouseEvent(
OnMouseEnter(m_nCurrentTool);
if (!pTool->GetShortHelp().IsEmpty())
{
if (m_pToolTip)
delete m_pToolTip;
m_pToolTip = new wxToolTip(pTool->GetShortHelp());
m_vXMouse = (wxCoord)vPoint.x;
m_vYMouse = (wxCoord)vPoint.y;
@@ -1449,11 +1446,14 @@ void wxToolBar::OnTimer (
);
m_pToolTip->DisplayToolTipWindow(vPos);
m_vToolTimer.Stop();
m_vToolExpTimer.Start(3000L, TRUE);
}
else if (rEvent.GetId() == (int)m_vToolExpTimer.GetTimerId())
{
m_pToolTip->HideToolTipWindow();
GetParent()->Refresh();
m_vToolExpTimer.Stop();
}
} // end of wxToolBar::OnTimer