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..5e2634fd4628fbfdb65e3fc306dff41c2730fe8f 100644 |
--- a/ui/views/controls/button/text_button.cc |
+++ b/ui/views/controls/button/text_button.cc |
@@ -291,9 +291,11 @@ void TextButtonBase::SetIsDefault(bool is_default) { |
} |
void TextButtonBase::SetText(const string16& text) { |
- text_ = text; |
- SetAccessibleName(text); |
- UpdateTextSize(); |
+ if (text != text_) { |
Daniel Erat
2012/09/11 20:53:37
nit: just:
if (text == text_)
return;
and
|
+ text_ = text; |
+ SetAccessibleName(text); |
+ UpdateTextSize(); |
+ } |
} |
void TextButtonBase::SetFont(const gfx::Font& font) { |