Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(508)

Unified Diff: ui/app_list/views/apps_grid_view.cc

Issue 214423002: Reset the app list when it is shown on Windows and Linux. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix_app_list_folder_drag_for_real
Patch Set: small change for tapted@ Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« ui/app_list/views/apps_grid_view.h ('K') | « ui/app_list/views/apps_grid_view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« ui/app_list/views/apps_grid_view.h ('K') | « ui/app_list/views/apps_grid_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698