diff options
-rw-r--r-- | views/view.cc | 2 | ||||
-rw-r--r-- | views/view.h | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/views/view.cc b/views/view.cc index 8664ad9..c5db5db 100644 --- a/views/view.cc +++ b/views/view.cc @@ -791,6 +791,8 @@ int View::GetID() const { } void View::SetGroup(int gid) { + // Don't change the group id once it's set. + DCHECK(group_ == -1 || group_ == gid); group_ = gid; } diff --git a/views/view.h b/views/view.h index 66ef76f..764cbd3 100644 --- a/views/view.h +++ b/views/view.h @@ -454,7 +454,9 @@ class View : public AcceleratorTarget { // A group id is used to tag views which are part of the same logical group. // Focus can be moved between views with the same group using the arrow keys. // Groups are currently used to implement radio button mutual exclusion. + // The group id is immutable once it's set. void SetGroup(int gid); + // Returns the group id of the view, or -1 if the id is not set yet. int GetGroup() const; // If this returns true, the views from the same group can each be focused |