Setting the enable state shouldn't change the checked state of a checkbox.

This commit is contained in:
Mark de Wever 2007-07-27 20:05:57 +00:00
parent 5d2cad7d8f
commit 4d1d84fba1

View File

@ -167,7 +167,10 @@ void button::enable(bool new_val)
if(new_val != enabled())
{
pressed_ = false;
state_ = NORMAL;
// check buttons should keep their state
if(type_ != TYPE_CHECK) {
state_ = NORMAL;
}
widget::enable(new_val);
}
}