X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/57591e0edb8cbaa2b12e4a0da68fe445fa636747..d1c8aaa3ee8e2051ebd20042b7e59a511c276ca2:/src/generic/treectlg.cpp diff --git a/src/generic/treectlg.cpp b/src/generic/treectlg.cpp index 7d9ea69e54..e9a1973d8b 100644 --- a/src/generic/treectlg.cpp +++ b/src/generic/treectlg.cpp @@ -2414,16 +2414,22 @@ void wxGenericTreeCtrl::OnMouse( wxMouseEvent &event ) nevent.SetEventObject(this); GetEventHandler()->ProcessEvent(nevent); } - else if ( event.LeftUp() && m_lastOnSame ) + else if ( event.LeftUp() ) { - if ( (item == m_current) && - (flags & wxTREE_HITTEST_ONITEMLABEL) && - HasFlag(wxTR_EDIT_LABELS) ) + if ( m_lastOnSame ) { - m_renameTimer->Start( 100, TRUE ); - } + if ( (item == m_current) && + (flags & wxTREE_HITTEST_ONITEMLABEL) && + HasFlag(wxTR_EDIT_LABELS) ) + { + if ( m_renameTimer->IsRunning() ) + m_renameTimer->Stop(); + + m_renameTimer->Start( 100, TRUE ); + } - m_lastOnSame = FALSE; + m_lastOnSame = FALSE; + } } else {