Fixed: Mouse wheel should scroll target object instead scroll bar (fixes issue #327)

--HG--
branch : develop
This commit is contained in:
Nimetu 2018-05-10 12:46:11 +03:00
parent 98ae75fe57
commit e625f2b3c7
2 changed files with 2 additions and 2 deletions

View file

@ -885,7 +885,7 @@ namespace NLGUI
} }
if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mousewheel && _Vertical) if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mousewheel && _Vertical)
{ {
moveTrackY (eventDesc.getWheel() * 12); moveTargetY (-(eventDesc.getWheel() * 12));
return true; return true;
} }
} }

View file

@ -1305,7 +1305,7 @@ namespace NLGUI
CInterfaceGroup *currParent = _Parent; CInterfaceGroup *currParent = _Parent;
while (currParent) while (currParent)
{ {
if (currParent->moveSBTrackY (this, eventDesc.getWheel()*12)) if (currParent->moveSBTargetY (this, -(eventDesc.getWheel()*12)))
return true; return true;
currParent = currParent->getParent(); currParent = currParent->getParent();
} }