MCPcopy Create free account
hub / github.com/MyGUI/mygui / notifyChangeProperty

Method notifyChangeProperty

Tools/EditorFramework/ListBoxDataControl.cpp:256–275  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls 5

replaceTagsFunction · 0.85
getParentMethod · 0.45
getOwnerMethod · 0.45
getItemCountMethod · 0.45
setItemNameAtMethod · 0.45

Tested by

no test coverage detected