Chromium Code Reviews| Index: ui/app_list/views/apps_grid_view.cc |
| diff --git a/ui/app_list/views/apps_grid_view.cc b/ui/app_list/views/apps_grid_view.cc |
| index 10828ffbdc32d8fa265a9220c2504e988bef03fa..9336c935147813a3279afb21d21efa86cf1ecc4c 100644 |
| --- a/ui/app_list/views/apps_grid_view.cc |
| +++ b/ui/app_list/views/apps_grid_view.cc |
| @@ -373,6 +373,17 @@ void AppsGridView::SetLayout(int icon_size, int cols, int rows_per_page) { |
| kTopPadding, kLeftRightPadding, 0, kLeftRightPadding)); |
| } |
| +void AppsGridView::ResetForShow() { |
| + activated_item_view_ = NULL; |
| + layer()->SetOpacity(1.0f); |
| + SetVisible(true); |
| + // Set all views to visible in case they weren't made visible again by an |
| + // incomplete animation. |
| + for (int i = 0; i < view_model_.view_size(); ++i) { |
| + view_model_.view_at(i)->SetVisible(true); |
| + } |
| +} |
| + |
| void AppsGridView::SetModel(AppListModel* model) { |
| if (model_) |
| model_->RemoveObserver(this); |
| @@ -1825,6 +1836,8 @@ void AppsGridView::OnListItemRemoved(size_t index, AppListItem* item) { |
| views::View* view = view_model_.view_at(index); |
| view_model_.Remove(index); |
| + if (activated_item_view_ == view) |
| + activated_item_view_ = NULL; |
|
jennyz
2014/03/28 16:59:46
Thanks!
|
| delete view; |
| UpdatePaging(); |