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
This commit is contained in:
Vadim Zeitlin
2012-07-07 13:27:55 +00:00
parent ff534ba469
commit d2dcbf20aa

View 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;
}