]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/treectlg.cpp
Fiddled with wxFindWindowAtPoint to make it work with notebooks and static boxes
[wxWidgets.git] / src / generic / treectlg.cpp
index 7d9ea69e548b49f8825853db96a88a636e16a1ac..e9a1973d8b2acb80ffd0f2702a73890b9b279fe0 100644 (file)
@@ -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
         {