summaryrefslogtreecommitdiffstats
path: root/src/input/frontend/qaxisactionhandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/input/frontend/qaxisactionhandler.cpp')
-rw-r--r--src/input/frontend/qaxisactionhandler.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/input/frontend/qaxisactionhandler.cpp b/src/input/frontend/qaxisactionhandler.cpp
index d69400e5b..d885c50c3 100644
--- a/src/input/frontend/qaxisactionhandler.cpp
+++ b/src/input/frontend/qaxisactionhandler.cpp
@@ -79,6 +79,11 @@ void QAxisActionHandler::setLogicalDevice(Qt3DInput::QLogicalDevice *logicalDevi
if (d->m_logicalDevice == logicalDevice)
return;
+ // Need to set the parent of the logical device if it has none
+ // so as to trigger the backend node created with a NodeCreated notification
+ if (logicalDevice && !logicalDevice->parent())
+ logicalDevice->setParent(this);
+
d->m_logicalDevice = logicalDevice;
emit logicalDeviceChanged(logicalDevice);
}