Skip to content

Commit

Permalink
Listbox: don't try to keep the selected item visible (#3016)
Browse files Browse the repository at this point in the history
@Vultraz stated in Discord that list box should keep the scroll position
instead.

Resolves #3016.
  • Loading branch information
jyrkive committed May 19, 2018
1 parent 4a3508f commit 3deef64
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/gui/widgets/listbox.cpp
Expand Up @@ -686,15 +686,6 @@ void listbox::layout_children(const bool force)

content_grid()->set_visible_rectangle(visible);

if(selected_item != -1) {
SDL_Rect rect = generator_->item(selected_item).get_rectangle();

rect.x = visible.x;
rect.w = visible.w;

show_content_rect(rect);
}

need_layout_ = false;
}
}
Expand Down

0 comments on commit 3deef64

Please sign in to comment.