| 254 | } |
| 255 | |
| 256 | void ListBoxDataControl::notifyChangeProperty(PropertyPtr _sender) |
| 257 | { |
| 258 | if (mParentData == nullptr) |
| 259 | return; |
| 260 | if (mParentData != _sender->getOwner()->getParent()) |
| 261 | return; |
| 262 | |
| 263 | for (size_t index = 0; index < mListBox->getItemCount(); index++) |
| 264 | { |
| 265 | DataPtr data = *mListBox->getItemDataAt<DataPtr>(index); |
| 266 | if (data == _sender->getOwner()) |
| 267 | { |
| 268 | bool unique = isDataEnabled(data); |
| 269 | if (unique) |
| 270 | mListBox->setItemNameAt(index, data->getPropertyValue(mPropertyForName)); |
| 271 | else |
| 272 | mListBox->setItemNameAt(index, replaceTags(mColourName) + data->getPropertyValue(mPropertyForName)); |
| 273 | } |
| 274 | } |
| 275 | } |
| 276 | |
| 277 | bool ListBoxDataControl::isDataEnabled(DataPtr _data) |
| 278 | { |
nothing calls this directly
no test coverage detected