}\r
this.activeItem = item;\r
if(!item.checked){\r
- item.setChecked(true, true);\r
+ item.setChecked(true, false);\r
}\r
if(this.forceIcon){\r
this.setIconClass(this.forceIcon);\r
this.itemCount = this.items.length;\r
\r
this.menu = {cls:'x-cycle-menu', items:[]};\r
- var checked;\r
+ var checked = 0;\r
Ext.each(this.items, function(item, i){\r
Ext.apply(item, {\r
group: item.group || this.id,\r
});\r
this.menu.items.push(item);\r
if(item.checked){\r
- checked = item;\r
+ checked = i;\r
}\r
}, this);\r
- this.setActiveItem(checked, true);\r
Ext.CycleButton.superclass.initComponent.call(this);\r
-\r
this.on('click', this.toggleSelected, this);\r
+ this.setActiveItem(checked, true);\r
},\r
\r
// private\r