Skip to content

Commit

Permalink
MP lobby: fix player list scrolling to top when it changes
Browse files Browse the repository at this point in the history
(cherry-picked from commit a365847)
  • Loading branch information
jyrkive committed Oct 7, 2018
1 parent eeace5a commit 8a2cf9a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/gui/dialogs/multiplayer/lobby.cpp
Expand Up @@ -583,6 +583,8 @@ void mp_lobby::update_playerlist()
assert(player_list_.other_games.tree);
assert(player_list_.other_rooms.tree);

unsigned scrollbar_position = player_list_.tree->get_vertical_scrollbar_item_position();

player_list_.active_game.tree->clear();
#ifdef ENABLE_ROOM_MEMBER_TREE
player_list_.active_room.tree->clear();
Expand Down Expand Up @@ -688,6 +690,8 @@ void mp_lobby::update_playerlist()
player_list_.other_rooms.update_player_count_label();
player_list_.other_games.update_player_count_label();

player_list_.tree->set_vertical_scrollbar_item_position(scrollbar_position);

player_list_dirty_ = false;
last_lobby_update_ = SDL_GetTicks();
}
Expand Down

0 comments on commit 8a2cf9a

Please sign in to comment.