mirror of
https://github.com/minetest/irrlicht.git
synced 2024-11-05 18:00:41 +01:00
Fix recently broken scroll behaviour of listbox with moveOverSelect
This also fixes the combobox which users the listbox like that. This got broken in [r6454] which had fixed the events send out by the listbox Note: Still a bit strange behaviour when leaving the combobox at the bottom, but that was already that way in Irrlicht 1.8, so I've got to investigate that on it's own. git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6463 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
parent
41bc7a1430
commit
ce3dcfde56
|
@ -631,7 +631,7 @@ void CGUIListBox::recalculateScrollPos()
|
|||
if (!AutoScroll)
|
||||
return;
|
||||
|
||||
const s32 selPos = (Selected == -1 ? TotalItemHeight : Selected * ItemHeight) - ScrollBar->getPos();
|
||||
const s32 selPos = (getSelected() == -1 ? TotalItemHeight : getSelected() * ItemHeight) - ScrollBar->getPos();
|
||||
|
||||
if (selPos < 0)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user