Index: ui/app_list/views/tile_item_view.cc |
diff --git a/ui/app_list/views/tile_item_view.cc b/ui/app_list/views/tile_item_view.cc |
index 583098e25cad9b879cba0a5c81e3e3b64971df96..d770e8102f5a0b8e09348460acd4c6449831a6f4 100644 |
--- a/ui/app_list/views/tile_item_view.cc |
+++ b/ui/app_list/views/tile_item_view.cc |
@@ -94,6 +94,10 @@ TileItemView::TileItemView() |
title_->SetFontList(rb.GetFontList(kItemTextFontStyle)); |
title_->SetHorizontalAlignment(gfx::ALIGN_CENTER); |
+ // When |item_| is NULL, the tile is invisible. Calling SetAppListItem with a |
+ // non-NULL item makes the tile visible. |
+ SetVisible(false); |
Matt Giuca
2014/06/16 00:29:28
I don't think adding this actually changes any beh
|
+ |
AddChildView(icon_); |
AddChildView(title_); |
} |
@@ -102,6 +106,12 @@ TileItemView::~TileItemView() { |
} |
void TileItemView::SetAppListItem(AppListItem* item) { |
+ // TODO(calamity): This will not update if the contents of |item_| have |
+ // changed since it was last assigned. Add an observer to refresh when the |
+ // item changes. |
+ if (item == item_) |
+ return; |
+ |
item_ = item; |
if (!item) { |
SetVisible(false); |