Index: chrome/browser/ui/search_engines/keyword_editor_controller.cc |
diff --git a/chrome/browser/ui/search_engines/keyword_editor_controller.cc b/chrome/browser/ui/search_engines/keyword_editor_controller.cc |
index 132ce860fd85be65088598cf392c6bb2e2fb762b..a44ab2dae36fc9ac5280a2fff157781c9cc732ec 100644 |
--- a/chrome/browser/ui/search_engines/keyword_editor_controller.cc |
+++ b/chrome/browser/ui/search_engines/keyword_editor_controller.cc |
@@ -39,12 +39,7 @@ int KeywordEditorController::AddTemplateURL(const string16& title, |
content::RecordAction(UserMetricsAction("KeywordEditor_AddKeyword")); |
- // There's a bug (1090726) in TableView with groups enabled such that newly |
- // added items in groups ALWAYS appear at the end, regardless of the index |
- // passed in. Worse yet, the selected rows get messed up when this happens |
- // causing other problems. As a work around we always add the item to the end |
- // of the list. |
- const int new_index = table_model_->RowCount(); |
+ const int new_index = table_model_->last_other_engine_index(); |
table_model_->Add(new_index, title, keyword, url); |
return new_index; |