Set focus to generic wxDataViewCtrl when clicking with any mouse button, not just left, closes #12586: wxDataviewCtrl only gets focused on left mouse
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65872 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -3442,6 +3442,10 @@ void wxDataViewMainWindow::OnMouse( wxMouseEvent &event )
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// set the focus to ourself if any of the mouse buttons are pressed
|
||||||
|
if(event.ButtonDown() && !HasFocus())
|
||||||
|
SetFocus();
|
||||||
|
|
||||||
int x = event.GetX();
|
int x = event.GetX();
|
||||||
int y = event.GetY();
|
int y = event.GetY();
|
||||||
m_owner->CalcUnscrolledPosition( x, y, &x, &y );
|
m_owner->CalcUnscrolledPosition( x, y, &x, &y );
|
||||||
@@ -3711,8 +3715,6 @@ void wxDataViewMainWindow::OnMouse( wxMouseEvent &event )
|
|||||||
}
|
}
|
||||||
else if ((event.LeftDown() || simulateClick) && !hoverOverExpander)
|
else if ((event.LeftDown() || simulateClick) && !hoverOverExpander)
|
||||||
{
|
{
|
||||||
SetFocus();
|
|
||||||
|
|
||||||
m_lineBeforeLastClicked = m_lineLastClicked;
|
m_lineBeforeLastClicked = m_lineLastClicked;
|
||||||
m_lineLastClicked = current;
|
m_lineLastClicked = current;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user