Merge commit '6571dc247d' into dev-hats

* commit '6571dc247d':
  Fixed bug #271: The scroll bar would move to the last selected file always, even when manually trying to scroll elsewhere
This commit is contained in:
HoraceAndTheSpider 2018-03-03 14:35:36 +00:00
commit 56327645fc

View file

@ -327,10 +327,17 @@ static void navigate_left()
static void SelectFileLoop()
{
FocusBugWorkaround(wndSelectFile);
int gotEvent = 0;
if (selectedOnStart >= 0)
{
scrAreaFiles->setVerticalScrollAmount(selectedOnStart * 15);
gotEvent = 1;
}
while (!dialogFinished)
{
int gotEvent = 0;
SDL_Event event;
while (SDL_PollEvent(&event))
{
@ -411,12 +418,7 @@ static void SelectFileLoop()
gui_input->pushInput(event);
#endif
}
if (selectedOnStart >= 0)
{
scrAreaFiles->setVerticalScrollAmount(selectedOnStart * 15);
gotEvent = 1;
}
if (gotEvent)
{
// Now we let the Gui object perform its logic.