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

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

Issue 10916222: Conservative update button/label/textfield content (Closed) Base URL: https://git.chromium.org/git/chromium/src@git-svn
Patch Set: 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
Index: ui/views/controls/label.cc
diff --git a/ui/views/controls/label.cc b/ui/views/controls/label.cc
index caa5c668558d38f133a01e8ff1b85d3347a4c908..2f6ee773749d3567d3c400b11c142df347802ecd 100644
--- a/ui/views/controls/label.cc
+++ b/ui/views/controls/label.cc
@@ -54,11 +54,13 @@ void Label::SetFont(const gfx::Font& font) {
}
void Label::SetText(const string16& text) {
- text_ = text;
- text_size_valid_ = false;
- is_email_ = false;
- PreferredSizeChanged();
- SchedulePaint();
+ if (text != text_) {
Daniel Erat 2012/09/11 20:53:37 nit: same here
+ text_ = text;
+ text_size_valid_ = false;
+ is_email_ = false;
+ PreferredSizeChanged();
+ SchedulePaint();
+ }
}
void Label::SetEmail(const string16& email) {

Powered by Google App Engine
This is Rietveld 408576698