From 5160f2929d9fe0e4d0b41e4c3bc5c03743ef24ff Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 28 Dec 2012 16:02:07 +0000 Subject: [PATCH] No changes, just avoid unused variable in wxUSE_TOOLTIPS==0 build. Move the declaration of a variable only used for tooltip setting inside "#if wxUSE_TOOLTIPS" test. Closes #14927. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73288 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/aui/auibook.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/aui/auibook.cpp b/src/aui/auibook.cpp index f77bcef2e0..1aa4b2569c 100644 --- a/src/aui/auibook.cpp +++ b/src/aui/auibook.cpp @@ -1233,10 +1233,9 @@ void wxAuiTabCtrl::OnMotion(wxMouseEvent& evt) } } - wxWindow* wnd = NULL; - #if wxUSE_TOOLTIPS - if (evt.Moving() && TabHitTest(evt.m_x, evt.m_y, &wnd)) + wxWindow* wnd = NULL; + if (evt.Moving() && TabHitTest(evt.m_x, evt.m_y, &wnd)) { wxString tooltip(m_pages[GetIdxFromWindow(wnd)].tooltip); @@ -1247,8 +1246,8 @@ void wxAuiTabCtrl::OnMotion(wxMouseEvent& evt) } else UnsetToolTip(); -#endif - +#endif // wxUSE_TOOLTIPS + if (!evt.LeftIsDown() || m_clickPt == wxDefaultPosition) return; -- 2.47.2