Fixed mouse scroll on lists going out of range, closes #660
parent
2111c6d177
commit
883e07ad6a
|
@ -281,10 +281,10 @@ bool CList::EventProcess(const Event &event)
|
|||
{
|
||||
auto data = event.GetData<MouseWheelEventData>();
|
||||
m_firstLine -= data->y;
|
||||
if (m_firstLine < 0)
|
||||
m_firstLine = 0;
|
||||
if (m_firstLine > m_totalLine - m_displayLine)
|
||||
m_firstLine = m_totalLine - m_displayLine;
|
||||
if (m_firstLine < 0)
|
||||
m_firstLine = 0;
|
||||
|
||||
UpdateScroll();
|
||||
UpdateButton();
|
||||
|
|
Loading…
Reference in New Issue