Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(406)

Unified Diff: ui/views/controls/combobox/combobox.cc

Issue 26540004: Return blank strings for Views Combobox separator items. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Upload again to kick the CQ. Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/views/controls/combobox/combobox_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/combobox/combobox.cc
diff --git a/ui/views/controls/combobox/combobox.cc b/ui/views/controls/combobox/combobox.cc
index 5c414d0da42b16f3326fc798a7b4fa7537ad94c2..805af3b42ac82f8b175954b9c391697decc55a59 100644
--- a/ui/views/controls/combobox/combobox.cc
+++ b/ui/views/controls/combobox/combobox.cc
@@ -178,7 +178,7 @@ void Combobox::SetSelectedRow(int row) {
}
string16 Combobox::GetTextForRow(int row) {
- return model()->GetItemAt(row);
+ return model()->IsItemSeparatorAt(row) ? string16() : model()->GetItemAt(row);
}
////////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « no previous file | ui/views/controls/combobox/combobox_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698