Showing the changes to libraries/script-engine/src/ScriptEngine.cpp (1 of 6 files). Show all
Unified · Split
| @@ -976,7 +976,9 @@ void ScriptEngine::addEventHandler(const EntityItemID& entityID, const QString& · 975 unmodified lines | ||
| 976 | 976 | using PointerHandler = std::function<void(const EntityItemID&, const PointerEvent&)>; |
| 977 | 977 | auto makePointerHandler = [this](QString eventName) -> PointerHandler { |
| 978 | 978 | return [this, eventName](const EntityItemID& entityItemID, const PointerEvent& event) { |
| 979 | − forwardHandlerCall(entityItemID, eventName, { entityItemID.toScriptValue(this), event.toScriptValue(this) }); | |
| 979 | + if (!EntityTree::areEntityClicksCaptured()) { | |
| 980 | + forwardHandlerCall(entityItemID, eventName, { entityItemID.toScriptValue(this), event.toScriptValue(this) }); | |
| 981 | + } | |
| 980 | 982 | }; |
| 981 | 983 | }; |
| 982 | 984 | |