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

Unified Diff: ui/views/controls/button/text_button.cc

Issue 10916222: Conservative update button/label/textfield content (Closed) Base URL: https://git.chromium.org/git/chromium/src@git-svn
Patch Set: Nit fixes.wq Created 8 years, 3 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/label.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/button/text_button.cc
diff --git a/ui/views/controls/button/text_button.cc b/ui/views/controls/button/text_button.cc
index 1a4c4e700cadce959305fb9e01ea9af2caf37e65..961c70d36d227f1ed49051ae7ccfd0e0220be055 100644
--- a/ui/views/controls/button/text_button.cc
+++ b/ui/views/controls/button/text_button.cc
@@ -291,6 +291,8 @@ void TextButtonBase::SetIsDefault(bool is_default) {
}
void TextButtonBase::SetText(const string16& text) {
+ if (text == text_)
+ return;
text_ = text;
SetAccessibleName(text);
UpdateTextSize();
« no previous file with comments | « no previous file | ui/views/controls/label.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698