Move check for mouse button down events in wxDataViewMainWindow
No real changes, just prepare for the next commit.
This commit is contained in:
@@ -4525,14 +4525,6 @@ void wxDataViewMainWindow::OnMouse( wxMouseEvent &event )
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(event.ButtonDown())
|
|
||||||
{
|
|
||||||
// Not skipping button down events would prevent the system from
|
|
||||||
// setting focus to this window as most (all?) of them do by default,
|
|
||||||
// so skip it to enable default handling.
|
|
||||||
event.Skip();
|
|
||||||
}
|
|
||||||
|
|
||||||
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 );
|
||||||
@@ -4560,6 +4552,14 @@ void wxDataViewMainWindow::OnMouse( wxMouseEvent &event )
|
|||||||
const unsigned int current = GetLineAt( y );
|
const unsigned int current = GetLineAt( y );
|
||||||
const wxDataViewItem item = GetItemByRow(current);
|
const wxDataViewItem item = GetItemByRow(current);
|
||||||
|
|
||||||
|
if(event.ButtonDown())
|
||||||
|
{
|
||||||
|
// Not skipping button down events would prevent the system from
|
||||||
|
// setting focus to this window as most (all?) of them do by default,
|
||||||
|
// so skip it to enable default handling.
|
||||||
|
event.Skip();
|
||||||
|
}
|
||||||
|
|
||||||
// Handle right clicking here, before everything else as context menu
|
// Handle right clicking here, before everything else as context menu
|
||||||
// events should be sent even when we click outside of any item, unlike all
|
// events should be sent even when we click outside of any item, unlike all
|
||||||
// the other ones.
|
// the other ones.
|
||||||
|
Reference in New Issue
Block a user