From f6e98d501443908973341eac9d02c646ae1d0b3e Mon Sep 17 00:00:00 2001 From: nvsickle Date: Tue, 13 Apr 2021 11:08:22 -0700 Subject: [PATCH] Fix viewport context menu hiding cursor and sometimes popping up repeatedly --- .../AzToolsFramework/Viewport/EditorContextMenu.cpp | 2 +- Code/Sandbox/Editor/LegacyViewportCameraController.cpp | 1 - Code/Sandbox/Editor/ViewportManipulatorController.cpp | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Viewport/EditorContextMenu.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Viewport/EditorContextMenu.cpp index 300820c2df..7fa9724d65 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Viewport/EditorContextMenu.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Viewport/EditorContextMenu.cpp @@ -65,7 +65,7 @@ namespace AzToolsFramework if (!contextMenu.m_menu->isEmpty()) { - contextMenu.m_menu->popup(QCursor::pos()); + contextMenu.m_menu->exec(QCursor::pos()); } } } diff --git a/Code/Sandbox/Editor/LegacyViewportCameraController.cpp b/Code/Sandbox/Editor/LegacyViewportCameraController.cpp index 0c34706e24..44b722d222 100644 --- a/Code/Sandbox/Editor/LegacyViewportCameraController.cpp +++ b/Code/Sandbox/Editor/LegacyViewportCameraController.cpp @@ -342,7 +342,6 @@ bool LegacyViewportCameraControllerInstance::HandleInputChannelEvent(const AzFra m_inRotateMode = true; } - shouldConsumeEvent = true; shouldCaptureCursor = true; } else if (state == InputChannel::State::Ended) diff --git a/Code/Sandbox/Editor/ViewportManipulatorController.cpp b/Code/Sandbox/Editor/ViewportManipulatorController.cpp index b45dc711ee..910d037670 100644 --- a/Code/Sandbox/Editor/ViewportManipulatorController.cpp +++ b/Code/Sandbox/Editor/ViewportManipulatorController.cpp @@ -21,8 +21,8 @@ #include -static const auto ManipulatorPriority = AzFramework::ViewportControllerPriority::Highest; -static const auto InteractionPriority = AzFramework::ViewportControllerPriority::High; +static const auto ManipulatorPriority = AzFramework::ViewportControllerPriority::High; +static const auto InteractionPriority = AzFramework::ViewportControllerPriority::Low; namespace SandboxEditor {