calling SetFocus() in OnMouseUp() is unnecessary if we skip the event in OnMouseDown()

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49329 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-10-22 11:35:19 +00:00
parent bf10569350
commit bc0e68ebaf

View File

@@ -1136,9 +1136,10 @@ void wxHtmlWindow::OnMouseDown(wxMouseEvent& event)
CaptureMouse();
}
}
#else
wxUnusedVar(event);
#endif // wxUSE_CLIPBOARD
// in any case, let the default handler set focus to this window
event.Skip();
}
void wxHtmlWindow::OnMouseUp(wxMouseEvent& event)
@@ -1163,8 +1164,6 @@ void wxHtmlWindow::OnMouseUp(wxMouseEvent& event)
}
#endif // wxUSE_CLIPBOARD
SetFocus();
wxPoint pos = CalcUnscrolledPosition(event.GetPosition());
wxHtmlWindowMouseHelper::HandleMouseClick(m_Cell, pos, event);
}