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

Method notifyChangeDataSelector

Tools/ImageEditor/IndexTextureController.cpp:40–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38 }
39
40 void IndexTextureController::notifyChangeDataSelector(DataPtr _data, bool _changeOnlySelection)
41 {
42 mParentData = _data;
43 if (mParentData != nullptr && mParentData->getType()->getName() != mParentTypeName)
44 mParentData = nullptr;
45
46 std::string texture;
47 PropertyPtr property = PropertyUtility::getPropertyByName("Group", "Texture");
48 if (property != nullptr)
49 {
50 texture = property->getValue();
51
52 if (!property->eventChangeProperty.exist(this, &IndexTextureController::notifyChangeProperty))
53 property->eventChangeProperty.connect(this, &IndexTextureController::notifyChangeProperty);
54 }
55
56 std::string coord;
57 property = PropertyUtility::getPropertyByName("Group", "Size");
58 if (property != nullptr)
59 {
60 coord = property->getValue();
61
62 if (!property->eventChangeProperty.exist(this, &IndexTextureController::notifyChangeProperty))
63 property->eventChangeProperty.connect(this, &IndexTextureController::notifyChangeProperty);
64 }
65
66 if (mParentData != nullptr)
67 {
68 for (Data::VectorData::const_iterator child = mParentData->getChilds().begin();
69 child != mParentData->getChilds().end();
70 child++)
71 {
72 property = (*child)->getProperty("Point");
73 if (!property->eventChangeProperty.exist(this, &IndexTextureController::notifyChangeProperty))
74 property->eventChangeProperty.connect(this, &IndexTextureController::notifyChangeProperty);
75 }
76 }
77
78 mControl->setTextureValue(texture);
79 updateCoords(coord);
80 }
81
82 void IndexTextureController::notifyChangeProperty(PropertyPtr _sender)
83 {

Callers

nothing calls this directly

Calls 8

setTextureValueMethod · 0.80
getTypeMethod · 0.45
getValueMethod · 0.45
existMethod · 0.45
connectMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
getPropertyMethod · 0.45

Tested by

no test coverage detected