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

Method notifyChangeDataSelector

Tools/ImageEditor/GroupTextureController.cpp:40–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38 }
39
40 void GroupTextureController::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, &GroupTextureController::notifyChangeProperty))
53 property->eventChangeProperty.connect(this, &GroupTextureController::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, &GroupTextureController::notifyChangeProperty))
63 property->eventChangeProperty.connect(this, &GroupTextureController::notifyChangeProperty);
64 }
65
66 mControl->setTextureValue(texture);
67 updateCoords(coord);
68 }
69
70 void GroupTextureController::notifyChangeProperty(PropertyPtr _sender)
71 {

Callers

nothing calls this directly

Calls 5

setTextureValueMethod · 0.80
getTypeMethod · 0.45
getValueMethod · 0.45
existMethod · 0.45
connectMethod · 0.45

Tested by

no test coverage detected