Index: views/controls/menu/menu_controller.cc |
diff --git a/views/controls/menu/menu_controller.cc b/views/controls/menu/menu_controller.cc |
index 5703d693e99db415b750686263a2655ab3fade1f..eee5f9ff23791bc4e9117d5310513a6dfb48d619 100644 |
--- a/views/controls/menu/menu_controller.cc |
+++ b/views/controls/menu/menu_controller.cc |
@@ -1344,14 +1344,11 @@ void MenuController::MenuChildrenChanged(MenuItemView* item) { |
DCHECK(item); |
DCHECK(item->GetSubmenu()->IsShowing()); |
- // Currently this only supports adjusting the bounds of the last menu. |
- DCHECK(item == state_.item->GetParentMenuItem()); |
- |
// Make sure the submenu isn't showing for the current item (the position may |
// have changed or the menu removed). This also moves the selection back to |
// the parent, which handles the case where the selected item was removed. |
- SetSelection(state_.item->GetParentMenuItem(), |
- SELECTION_OPEN_SUBMENU | SELECTION_UPDATE_IMMEDIATELY); |
+ if (state_.item) |
+ SetSelection(item, SELECTION_OPEN_SUBMENU | SELECTION_UPDATE_IMMEDIATELY); |
sky
2011/05/06 16:17:00
This isn't right. It forces the selection to be wh
rhashimoto
2011/05/11 00:44:53
You're right. I've changed this to check if the c
|
OpenMenuImpl(item, false); |
} |