diff --git a/Code/Framework/AzFramework/AzFramework/Viewport/ViewportControllerList.cpp b/Code/Framework/AzFramework/AzFramework/Viewport/ViewportControllerList.cpp index 7f2059c1c4..1dd608319a 100644 --- a/Code/Framework/AzFramework/AzFramework/Viewport/ViewportControllerList.cpp +++ b/Code/Framework/AzFramework/AzFramework/Viewport/ViewportControllerList.cpp @@ -89,19 +89,11 @@ namespace AzFramework return; } - for (const auto priority : { - ViewportControllerPriority::Highest, - ViewportControllerPriority::High, - ViewportControllerPriority::Normal, - ViewportControllerPriority::Low, - ViewportControllerPriority::Lowest }) + for (const auto& controllerList : m_controllers) { - if (auto priorityListIt = m_controllers.find(priority); priorityListIt != m_controllers.end()) + for (const auto& controller : controllerList.second) { - for (const auto& controller : priorityListIt->second) - { - controller->ResetInputChannels(); - } + controller->ResetInputChannels(); } } } diff --git a/Code/Framework/AzFramework/AzFramework/Viewport/ViewportControllerList.h b/Code/Framework/AzFramework/AzFramework/Viewport/ViewportControllerList.h index 2d071498df..9da1d65dff 100644 --- a/Code/Framework/AzFramework/AzFramework/Viewport/ViewportControllerList.h +++ b/Code/Framework/AzFramework/AzFramework/Viewport/ViewportControllerList.h @@ -38,7 +38,7 @@ namespace AzFramework //! InputChannelEvents are sent to controllers in priority order (from the lowest priority value to the highest). bool HandleInputChannelEvent(const AzFramework::ViewportControllerInputEvent& event) override; //! Dispatches a ResetInputChannels call to all controllers registered to this list. - //! Calls to controllers are made in priority order (from the lowest priority value to the highest). + //! Calls to controllers are made in an undefined order. void ResetInputChannels() override; //! Dispatches an update tick to all controllers registered to this list. //! This occurs in *reverse* priority order (i.e. from the highest priority value to the lowest) so that