Showing the changes to interface/src/Application.cpp (1 of 5 files). Show all
Unified · Split
| @@ -1955,6 +1955,14 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 1954 unmodified lines | ||
| 1955 | 1955 | return false; |
| 1956 | 1956 | }); |
| 1957 | 1957 | |
| 1958 | + EntityTree::setGetEntityObjectOperator([this](const QUuid& id) -> QObject* { | |
| 1959 | + auto entities = getEntities(); | |
| 1960 | + if (auto entity = entities->renderableForEntityId(id)) { | |
| 1961 | + return qobject_cast<QObject*>(entity.get()); | |
| 1962 | + } | |
| 1963 | + return nullptr; | |
| 1964 | + }); | |
| 1965 | + | |
| 1958 | 1966 | EntityTree::setTextSizeOperator([this](const QUuid& id, const QString& text) { |
| 1959 | 1967 | auto entities = getEntities(); |
| 1960 | 1968 | if (auto entity = entities->renderableForEntityId(id)) { |