Don't set focus to generic wxDataViewCtrl on any button press.
Only set focus if the left button was pressed for consistency with just about everything else. Also, just skip the event instead of setting the focus explicitly. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72632 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -3939,9 +3939,12 @@ void wxDataViewMainWindow::OnMouse( wxMouseEvent &event )
|
||||
return;
|
||||
}
|
||||
|
||||
// set the focus to ourself if any of the mouse buttons are pressed
|
||||
if(event.ButtonDown() && !HasFocus())
|
||||
SetFocus();
|
||||
if(event.LeftDown())
|
||||
{
|
||||
// Not skipping this event would prevent the system from setting focus
|
||||
// to this window.
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
int x = event.GetX();
|
||||
int y = event.GetY();
|
||||
|
Reference in New Issue
Block a user