Fixed mouse scroll on lists going out of range, closes #660

dev-time-step
krzys-h 2015-10-01 20:22:44 +02:00
parent 2111c6d177
commit 883e07ad6a
1 changed files with 2 additions and 2 deletions

View File

@ -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();