| 46 | } |
| 47 | |
| 48 | void PropertyColourControl::updateProperty() |
| 49 | { |
| 50 | PropertyPtr proper = getProperty(); |
| 51 | if (proper != nullptr) |
| 52 | { |
| 53 | mEdit->setEnabled(!proper->getType()->getReadOnly()); |
| 54 | if (mEdit->getOnlyText() != proper->getValue()) |
| 55 | mEdit->setCaption(proper->getValue()); |
| 56 | |
| 57 | MyGUI::Colour colour; |
| 58 | bool validate = isValidate(colour); |
| 59 | if (validate) |
| 60 | { |
| 61 | mCurrentColour = colour; |
| 62 | mColour->setColour(mCurrentColour); |
| 63 | mColour->setAlpha(mCurrentColour.alpha); |
| 64 | } |
| 65 | |
| 66 | setColour(validate); |
| 67 | } |
| 68 | else |
| 69 | { |
| 70 | mEdit->setCaption(MyGUI::UString()); |
| 71 | mEdit->setEnabled(false); |
| 72 | |
| 73 | mCurrentColour = MyGUI::Colour::Zero; |
| 74 | mColour->setAlpha(mCurrentColour.alpha); |
| 75 | } |
| 76 | } |
| 77 | |
| 78 | void PropertyColourControl::notifyEditTextChange(MyGUI::EditBox* _sender) |
| 79 | { |
nothing calls this directly
no test coverage detected