Index: chrome/browser/ui/views/bookmarks/bookmark_menu_delegate.cc |
=================================================================== |
--- chrome/browser/ui/views/bookmarks/bookmark_menu_delegate.cc (revision 93451) |
+++ chrome/browser/ui/views/bookmarks/bookmark_menu_delegate.cc (working copy) |
@@ -64,15 +64,16 @@ |
parent_menu_item_ = parent; |
int initial_count = parent->GetSubmenu() ? |
parent->GetSubmenu()->GetMenuItemCount() : 0; |
+ if ((start_child_index < node->child_count()) && |
+ (initial_count > 0)) { |
+ parent->AppendSeparator(); |
+ } |
BuildMenu(node, start_child_index, parent, &next_menu_id_); |
if (show_options == SHOW_OTHER_FOLDER) { |
const BookmarkNode* other_folder = |
profile_->GetBookmarkModel()->other_node(); |
if (other_folder->child_count() > 0) { |
tfarina
2011/07/22 22:32:46
while you are here, can you change this check to !
|
- int current_count = parent->GetSubmenu() ? |
- parent->GetSubmenu()->GetMenuItemCount() : 0; |
- if (current_count != initial_count) |
- parent->AppendSeparator(); |
+ parent->AppendSeparator(); |
BuildOtherFolderMenu(parent, &next_menu_id_); |
} |
} |
@@ -358,6 +359,7 @@ |
int* next_menu_id) { |
DCHECK(!parent->child_count() || |
start_child_index < parent->child_count()); |
+ |
sky
2011/07/22 22:47:00
remove this line.
|
for (int i = start_child_index; i < parent->child_count(); ++i) { |
const BookmarkNode* node = parent->GetChild(i); |
int id = *next_menu_id; |