From 883e07ad6a060cbcbebe553a7e6c51f1f1e505fc Mon Sep 17 00:00:00 2001 From: krzys-h Date: Thu, 1 Oct 2015 20:22:44 +0200 Subject: [PATCH] Fixed mouse scroll on lists going out of range, closes #660 --- src/ui/controls/list.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ui/controls/list.cpp b/src/ui/controls/list.cpp index 102e34bc4..7ed77b7e9 100644 --- a/src/ui/controls/list.cpp +++ b/src/ui/controls/list.cpp @@ -281,10 +281,10 @@ bool CList::EventProcess(const Event &event) { auto data = event.GetData(); 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();