summaryrefslogtreecommitdiffstats
path: root/views/controls/menu/simple_menu_model.cc
diff options
context:
space:
mode:
Diffstat (limited to 'views/controls/menu/simple_menu_model.cc')
-rw-r--r--views/controls/menu/simple_menu_model.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/views/controls/menu/simple_menu_model.cc b/views/controls/menu/simple_menu_model.cc
index de86bce..67a9e2d 100644
--- a/views/controls/menu/simple_menu_model.cc
+++ b/views/controls/menu/simple_menu_model.cc
@@ -103,7 +103,9 @@ bool SimpleMenuModel::GetAcceleratorAt(int index,
bool SimpleMenuModel::IsItemCheckedAt(int index) const {
if (!delegate_)
return false;
- return delegate_->IsCommandIdChecked(GetCommandIdAt(index));
+ int item_index = FlipIndex(index);
+ return (items_[item_index].type == TYPE_CHECK) ?
+ delegate_->IsCommandIdChecked(GetCommandIdAt(index)) : false;
}
int SimpleMenuModel::GetGroupIdAt(int index) const {