summaryrefslogtreecommitdiffstats
path: root/views/controls/button/radio_button.cc
diff options
context:
space:
mode:
Diffstat (limited to 'views/controls/button/radio_button.cc')
-rw-r--r--views/controls/button/radio_button.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/views/controls/button/radio_button.cc b/views/controls/button/radio_button.cc
index 3f4820d..744dbe1 100644
--- a/views/controls/button/radio_button.cc
+++ b/views/controls/button/radio_button.cc
@@ -4,6 +4,7 @@
#include "views/controls/button/radio_button.h"
+#include "base/logging.h"
#include "views/widget/root_view.h"
namespace views {
@@ -14,12 +15,6 @@ const char RadioButton::kViewClassName[] = "views/RadioButton";
////////////////////////////////////////////////////////////////////////////////
// RadioButton, public:
-RadioButton::RadioButton() : Checkbox() {
-}
-
-RadioButton::RadioButton(const std::wstring& label) : Checkbox(label) {
-}
-
RadioButton::RadioButton(const std::wstring& label, int group_id)
: Checkbox(label) {
SetGroup(group_id);
@@ -47,6 +42,11 @@ void RadioButton::SetChecked(bool checked) {
std::vector<View*>::iterator i;
for (i = other.begin(); i != other.end(); ++i) {
if (*i != this) {
+ if ((*i)->GetClassName() != kViewClassName) {
+ NOTREACHED() << "radio-button has same group as other non "
+ "radio-button views.";
+ continue;
+ }
RadioButton* peer = static_cast<RadioButton*>(*i);
peer->SetChecked(false);
}