(c Condition)
| 152 | } |
| 153 | |
| 154 | func (a *Action) SetCheckedCondition(c Condition) { |
| 155 | if a.checkedCondition != nil { |
| 156 | a.checkedCondition.Changed().Detach(a.checkedConditionChangedHandle) |
| 157 | } |
| 158 | |
| 159 | a.checkedCondition = c |
| 160 | |
| 161 | if c != nil { |
| 162 | a.checked = c.Satisfied() |
| 163 | |
| 164 | a.checkedConditionChangedHandle = c.Changed().Attach(func() { |
| 165 | if a.checked != c.Satisfied() { |
| 166 | a.checked = !a.checked |
| 167 | |
| 168 | a.raiseChanged() |
| 169 | } |
| 170 | }) |
| 171 | } |
| 172 | |
| 173 | a.raiseChanged() |
| 174 | } |
| 175 | |
| 176 | func (a *Action) Default() bool { |
| 177 | return a.defawlt |
nothing calls this directly
no test coverage detected