Better EVT_MOTION handling in wxPGSpinButton
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57200 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -194,18 +194,23 @@ private:
|
|||||||
{
|
{
|
||||||
if ( m_bLeftDown )
|
if ( m_bLeftDown )
|
||||||
{
|
{
|
||||||
Capture();
|
|
||||||
int dy = m_ptPosition.y - event.GetPosition().y;
|
int dy = m_ptPosition.y - event.GetPosition().y;
|
||||||
m_ptPosition = event.GetPosition();
|
if ( dy )
|
||||||
|
{
|
||||||
|
Capture();
|
||||||
|
m_ptPosition = event.GetPosition();
|
||||||
|
|
||||||
wxSpinEvent evtscroll( (dy >= 0) ? wxEVT_SCROLL_LINEUP :
|
wxSpinEvent evtscroll( (dy >= 0) ? wxEVT_SCROLL_LINEUP :
|
||||||
wxEVT_SCROLL_LINEDOWN,
|
wxEVT_SCROLL_LINEDOWN,
|
||||||
GetId() );
|
GetId() );
|
||||||
evtscroll.SetEventObject(this);
|
evtscroll.SetEventObject(this);
|
||||||
|
|
||||||
m_spins = abs(dy);
|
wxASSERT( m_spins == 1 );
|
||||||
GetEventHandler()->ProcessEvent(evtscroll);
|
|
||||||
m_spins = 1;
|
m_spins = abs(dy);
|
||||||
|
GetEventHandler()->ProcessEvent(evtscroll);
|
||||||
|
m_spins = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user