]> git.saurik.com Git - wxWidgets.git/commitdiff
Don't call HitTest() unnecessarily in MSW wxTreeCtrl code.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 7 Jul 2012 13:27:55 +0000 (13:27 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 7 Jul 2012 13:27:55 +0000 (13:27 +0000)
We already called TreeView_HitTest() above, there is no need to call
wxTreeCtrl::HitTest() again to retrieve exactly the same information.

This also incidentally fixes a warning about unused variable, see #14459.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71977 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/treectrl.cpp

index 2cfcbd8f39ed8baf27e8dbeb684a4fc1c3ae3722..e84bd1b324b8d97e258c904201ad5d8a94d76c73 100644 (file)
@@ -2925,10 +2925,7 @@ wxTreeCtrl::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
                 // click if needed
                 if ( processed )
                 {
-                    int htFlags = 0;
-                    wxTreeItemId item = HitTest(wxPoint(x, y), htFlags);
-
-                    if ( htFlags & wxTREE_HITTEST_ONITEMSTATEICON )
+                    if ( tvht.flags & TVHT_ONITEMSTATEICON )
                     {
                         m_triggerStateImageClick = true;
                     }