Index: ash/launcher/launcher_view.cc |
diff --git a/ash/launcher/launcher_view.cc b/ash/launcher/launcher_view.cc |
index 1ec3e9461eb4df1e9175306d6f3402daab788881..86ba3970c5909dd758db1a78a8e9a562922c5295 100644 |
--- a/ash/launcher/launcher_view.cc |
+++ b/ash/launcher/launcher_view.cc |
@@ -792,7 +792,7 @@ void LauncherView::CalculateIdealBounds(IdealBounds* bounds) { |
// Create Space for the overflow button |
if (show_overflow && ash::switches::UseAlternateShelfLayout() && |
- last_visible_index_ > 0) |
+ last_visible_index_ > 0 && last_visible_index_ < last_button_index) |
James Cook
2013/08/22 00:19:12
Should this be part of a separate CL, or is it nee
Harry McCleave
2013/08/27 00:37:00
This fixes an issue asserted by a unit test, if th
|
--last_visible_index_; |
for (int i = 0; i < view_model_->view_size(); ++i) { |
bool visible = i <= last_visible_index_ || i > last_hidden_index_; |
@@ -808,7 +808,8 @@ void LauncherView::CalculateIdealBounds(IdealBounds* bounds) { |
if (last_visible_index_ == -1) { |
x = shelf->SelectValueForShelfAlignment(inset, 0, 0, inset); |
y = shelf->SelectValueForShelfAlignment(0, inset, inset, 0); |
- } else if (last_visible_index_ == last_button_index) { |
+ } else if (last_visible_index_ == last_button_index |
+ && !ash::switches::UseAlternateShelfLayout()) { |
x = view_model_->ideal_bounds(last_visible_index_).x(); |
y = view_model_->ideal_bounds(last_visible_index_).y(); |
} else { |