]> git.saurik.com Git - wxWidgets.git/commitdiff
fixed bug in mouse handling
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 12 Sep 2000 08:29:02 +0000 (08:29 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 12 Sep 2000 08:29:02 +0000 (08:29 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8336 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/treectlg.cpp

index 7d9ea69e548b49f8825853db96a88a636e16a1ac..c65b85bf946f3f383a69966488fb1c5e6e1187cd 100644 (file)
@@ -2414,16 +2414,19 @@ 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) )
+                {
+                    m_renameTimer->Start( 100, TRUE );
+                }
 
-            m_lastOnSame = FALSE;
+                m_lastOnSame = FALSE;
+            }
         }
         else
         {