Commit a97606e0 authored by Takumi Fujimoto's avatar Takumi Fujimoto Committed by Commit Bot

[Harmony Cast Dialog] Update the scroll bar position for the sink list

When we restore the scroll position after a model update, we must
refresh the scroll view layout to show the scroll bar in the right
position.

Bug: 848974
Change-Id: I20748614d5c594efb472e5cd19d9c7a823fa483b
Reviewed-on: https://chromium-review.googlesource.com/1157558Reviewed-by: default avatarDerek Cheng <imcheng@chromium.org>
Commit-Queue: Takumi Fujimoto <takumif@chromium.org>
Cr-Commit-Position: refs/heads/master@{#579943}
parent 1b5bbb47
...@@ -314,8 +314,10 @@ void CastDialogView::RestoreSinkListState() { ...@@ -314,8 +314,10 @@ void CastDialogView::RestoreSinkListState() {
views::ScrollBar* scroll_bar = views::ScrollBar* scroll_bar =
const_cast<views::ScrollBar*>(scroll_view_->vertical_scroll_bar()); const_cast<views::ScrollBar*>(scroll_view_->vertical_scroll_bar());
if (scroll_bar) if (scroll_bar) {
scroll_view_->ScrollToPosition(scroll_bar, scroll_position_); scroll_view_->ScrollToPosition(scroll_bar, scroll_position_);
scroll_view_->Layout();
}
} }
void CastDialogView::PopulateScrollView(const std::vector<UIMediaSink>& sinks) { void CastDialogView::PopulateScrollView(const std::vector<UIMediaSink>& sinks) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment