From d2dcbf20aa97d60147c5e44b21877e229282f436 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 7 Jul 2012 13:27:55 +0000 Subject: [PATCH] Don't call HitTest() unnecessarily in MSW wxTreeCtrl code. 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 | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/msw/treectrl.cpp b/src/msw/treectrl.cpp index 2cfcbd8f39..e84bd1b324 100644 --- a/src/msw/treectrl.cpp +++ b/src/msw/treectrl.cpp @@ -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; } -- 2.45.2