Be sure to call super() in our clickHandler so that selected state toggles

when toggle mode is true.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4278 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Ray Greenwell
2006-07-19 22:25:30 +00:00
parent 2dcdebc29b
commit 783b5ef33d
@@ -31,8 +31,14 @@ public class CommandButton extends Button
override protected function clickHandler (event :MouseEvent) :void
{
dispatchEvent(new ControllerEvent(_cmd, _arg));
event.stopImmediatePropagation();
super.clickHandler(event);
if (enabled) {
// stop the click event
event.stopImmediatePropagation();
// dispatch the command event
dispatchEvent(new ControllerEvent(_cmd, _arg));
}
}
/** The command to submit when clicked. */