FScrollView now scrolls automatically to the focused widget

This commit is contained in:
Markus Gans 2017-01-26 00:37:02 +01:00
parent 59189160fd
commit d2ba29d842
1 changed files with 2 additions and 2 deletions

View File

@ -520,12 +520,12 @@ void FScrollView::onChildFocusChanged (FFocusEvent*)
if ( wx > vx )
x = widget_geometry.getX2() - viewport_geometry.getWidth() + 3;
else if ( wx < vx )
else
x = wx;
if ( wy > vy )
y = widget_geometry.getY2() - viewport_geometry.getHeight() + 3;
else if ( wy < vy )
else
y = wy;
scrollTo (x, y);