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:
commit
56327645fc
1 changed files with 9 additions and 7 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue