| 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 | { |
nothing calls this directly
no test coverage detected