Skip to content

Commit 0b1517d

Browse files
committed
handle mouse scroll in compare power report list
1 parent d85568e commit 0b1517d

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/Classes/CompareTab.lua

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2250,8 +2250,11 @@ function CompareTabClass:HandleScrollInput(contentVP, inputEvents)
22502250
local mouseInContent = cursorX >= contentVP.x and cursorX < contentVP.x + contentVP.width
22512251
and cursorY >= contentVP.y and cursorY < contentVP.y + contentVP.height
22522252

2253+
local listControl = self.controls.comparePowerReportList
2254+
local mouseOverList = listControl:IsShown() and listControl:IsMouseOver()
2255+
22532256
for id, event in ipairs(inputEvents) do
2254-
if event.type == "KeyDown" and mouseInContent then
2257+
if event.type == "KeyDown" and mouseInContent and not mouseOverList then
22552258
if event.key == "WHEELUP" and self.compareViewMode ~= "TREE" then
22562259
self.scrollY = m_max(self.scrollY - 40, 0)
22572260
inputEvents[id] = nil

0 commit comments

Comments
 (0)