Bugfix - ViewportInteractionImp connected to the wrong id in RenderViewportWidget (#6867)

Signed-off-by: rhhong <rhhong@amazon.com>
monroegm-disable-blank-issue-2
Roman 4 years ago committed by GitHub
parent 073994e8e7
commit e224fc2ee5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -68,6 +68,7 @@ namespace AtomToolsFramework
{
return false;
}
const AzFramework::ViewportId newId = m_viewportContext->GetId();
SetControllerList(AZStd::make_shared<AzFramework::ViewportControllerList>());
@ -78,14 +79,14 @@ namespace AtomToolsFramework
m_viewportInteractionImpl = AZStd::make_unique<ViewportInteractionImpl>(m_defaultCamera);
m_viewportInteractionImpl->m_deviceScalingFactorFn = [this] { return aznumeric_cast<float>(devicePixelRatioF()); };
m_viewportInteractionImpl->m_screenSizeFn = [this] { return AzFramework::ScreenSize(width(), height()); };
m_viewportInteractionImpl->Connect(id);
m_viewportInteractionImpl->Connect(newId);
AzToolsFramework::ViewportInteraction::ViewportMouseCursorRequestBus::Handler::BusConnect(GetId());
AzFramework::InputChannelEventListener::Connect();
AZ::TickBus::Handler::BusConnect();
AzFramework::WindowRequestBus::Handler::BusConnect(params.windowHandle);
m_inputChannelMapper = new AzToolsFramework::QtEventToAzInputMapper(this, id);
m_inputChannelMapper = new AzToolsFramework::QtEventToAzInputMapper(this, newId);
// Forward input events to our controller list.
QObject::connect(m_inputChannelMapper, &AzToolsFramework::QtEventToAzInputMapper::InputChannelUpdated, this,

Loading…
Cancel
Save