2
0
Эх сурвалжийг харах

Remove calls to IsNewActionManagerEnabled

Signed-off-by: Danilo Aimini <[email protected]>
Danilo Aimini 2 жил өмнө
parent
commit
38aaab3036
21 өөрчлөгдсөн 107 нэмэгдсэн , 1165 устгасан
  1. 0 10
      Code/Editor/EditorViewportWidget.cpp
  2. 1 4
      Code/Editor/ViewPane.cpp
  3. 1 1
      Code/Framework/AzToolsFramework/AzToolsFramework/ActionManager/ActionManagerSystemComponent.cpp
  4. 2 8
      Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/Views/AssetBrowserTableView.cpp
  5. 2 8
      Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/Views/AssetBrowserThumbnailView.cpp
  6. 3 9
      Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/Views/AssetBrowserTreeView.cpp
  7. 7 13
      Code/Framework/AzToolsFramework/AzToolsFramework/ComponentMode/ComponentModeActionHandler.cpp
  8. 3 6
      Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/EditorVertexSelection.cpp
  9. 2 110
      Code/Framework/AzToolsFramework/AzToolsFramework/UI/Outliner/EntityOutlinerWidget.cpp
  10. 15 498
      Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/PrefabIntegrationManager.cpp
  11. 0 15
      Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/PrefabIntegrationManager.h
  12. 3 9
      Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/EntityPropertyEditor.cpp
  13. 30 36
      Code/Framework/AzToolsFramework/AzToolsFramework/UnitTest/AzToolsFrameworkTestHelpers.h
  14. 3 32
      Code/Framework/AzToolsFramework/AzToolsFramework/Viewport/EditorContextMenu.cpp
  15. 9 328
      Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorTransformComponentSelection.cpp
  16. 0 5
      Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorTransformComponentSelection.h
  17. 4 32
      Code/Framework/AzToolsFramework/Tests/EditorTransformComponentSelectionTests.cpp
  18. 7 10
      Gems/AWSCore/Code/Source/AWSCoreEditorSystemComponent.cpp
  19. 4 7
      Gems/LandscapeCanvas/Code/Source/Editor/MainWindow.cpp
  20. 6 13
      Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/GraphVariablesTableView.cpp
  21. 5 11
      Gems/ScriptCanvas/Code/Editor/View/Windows/MainWindow.cpp

+ 0 - 10
Code/Editor/EditorViewportWidget.cpp

@@ -1230,16 +1230,6 @@ void EditorViewportWidget::focusOutEvent([[maybe_unused]] QFocusEvent* event)
 
 void EditorViewportWidget::keyPressEvent(QKeyEvent* event)
 {
-    if (!AzToolsFramework::IsNewActionManagerEnabled())
-    {
-        // Special case Escape key and bubble way up to the top level parent so that it can cancel us out of any active tool
-        // or clear the current selection
-        if (event->key() == Qt::Key_Escape)
-        {
-            QCoreApplication::sendEvent(GetIEditor()->GetEditorMainWindow(), event);
-        }
-    }
-
     // NOTE: we keep track of key presses and releases explicitly because the OS/Qt will insert a slight delay between sending
     // key events when the key is held down. This is standard, but makes responding to key events for game style input silly
     // because we want the movement to be butter smooth.

+ 1 - 4
Code/Editor/ViewPane.cpp

@@ -99,10 +99,7 @@ CLayoutViewPane::CLayoutViewPane(QWidget* parent)
 
 CLayoutViewPane::~CLayoutViewPane() 
 {
-    if (AzToolsFramework::IsNewActionManagerEnabled())
-    {
-        AzToolsFramework::ActionManagerRegistrationNotificationBus::Handler::BusDisconnect();
-    }
+    AzToolsFramework::ActionManagerRegistrationNotificationBus::Handler::BusDisconnect();
 
     if (m_viewportScrollArea)
     {

+ 1 - 1
Code/Framework/AzToolsFramework/AzToolsFramework/ActionManager/ActionManagerSystemComponent.cpp

@@ -123,7 +123,7 @@ namespace AzToolsFramework
         // The ActionManagerSystemComponent could be created in a tooling context
         // where a QGuiApplication does not exist such as the SerializeContextTools
         auto qAppInstance = QApplication::instance();
-        if (IsNewActionManagerEnabled() && qAppInstance != nullptr)
+        if (qAppInstance != nullptr)
         {
             m_defaultParentObject = new QWidget();
 

+ 2 - 8
Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/Views/AssetBrowserTableView.cpp

@@ -112,10 +112,7 @@ namespace AzToolsFramework
                      AfterRename(name);
                  });
 
-              if (AzToolsFramework::IsNewActionManagerEnabled())
-              {
-                AssignWidgetToActionContextHelper(EditorIdentifiers::EditorAssetBrowserActionContextIdentifier, this);
-              }
+              AssignWidgetToActionContextHelper(EditorIdentifiers::EditorAssetBrowserActionContextIdentifier, this);
 
               QAction* deleteAction = new QAction("Delete Action", this);
               deleteAction->setShortcut(QKeySequence::Delete);
@@ -180,10 +177,7 @@ namespace AzToolsFramework
 
         AssetBrowserTableView::~AssetBrowserTableView()
         {
-            if (AzToolsFramework::IsNewActionManagerEnabled())
-            {
-                RemoveWidgetFromActionContextHelper(EditorIdentifiers::EditorAssetBrowserActionContextIdentifier, this);
-            }
+            RemoveWidgetFromActionContextHelper(EditorIdentifiers::EditorAssetBrowserActionContextIdentifier, this);
         }
 
         AzQtComponents::AssetFolderTableView* AssetBrowserTableView::GetExpandedTableViewWidget() const

+ 2 - 8
Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/Views/AssetBrowserThumbnailView.cpp

@@ -159,18 +159,12 @@ namespace AzToolsFramework
             layout->addWidget(m_thumbnailViewWidget);
             setLayout(layout);
 
-            if (AzToolsFramework::IsNewActionManagerEnabled())
-            {
-                AssignWidgetToActionContextHelper(EditorIdentifiers::EditorAssetBrowserActionContextIdentifier, this);
-            }
+            AssignWidgetToActionContextHelper(EditorIdentifiers::EditorAssetBrowserActionContextIdentifier, this);
         }
 
         AssetBrowserThumbnailView::~AssetBrowserThumbnailView()
         {
-            if (AzToolsFramework::IsNewActionManagerEnabled())
-            {
-                RemoveWidgetFromActionContextHelper(EditorIdentifiers::EditorAssetBrowserActionContextIdentifier, this);
-            }
+            RemoveWidgetFromActionContextHelper(EditorIdentifiers::EditorAssetBrowserActionContextIdentifier, this);
         }
 
         AzQtComponents::AssetFolderThumbnailView* AssetBrowserThumbnailView::GetThumbnailViewWidget() const

+ 3 - 9
Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/Views/AssetBrowserTreeView.cpp

@@ -89,11 +89,8 @@ namespace AzToolsFramework
             AssetBrowserComponentNotificationBus::Handler::BusConnect();
             AssetBrowserInteractionNotificationBus::Handler::BusConnect();
 
-            if (AzToolsFramework::IsNewActionManagerEnabled())
-            {
-                // Assign this widget to the Editor Asset Browser Action Context.
-                AzToolsFramework::AssignWidgetToActionContextHelper(EditorIdentifiers::EditorAssetBrowserActionContextIdentifier, this);
-            }
+            // Assign this widget to the Editor Asset Browser Action Context.
+            AzToolsFramework::AssignWidgetToActionContextHelper(EditorIdentifiers::EditorAssetBrowserActionContextIdentifier, this);
 
             QAction* deleteAction = new QAction("Delete Action", this);
             deleteAction->setShortcut(QKeySequence::Delete);
@@ -128,10 +125,7 @@ namespace AzToolsFramework
 
         AssetBrowserTreeView::~AssetBrowserTreeView()
         {
-            if (AzToolsFramework::IsNewActionManagerEnabled())
-            {
-                AzToolsFramework::RemoveWidgetFromActionContextHelper(EditorIdentifiers::EditorAssetBrowserActionContextIdentifier, this);
-            }
+            AzToolsFramework::RemoveWidgetFromActionContextHelper(EditorIdentifiers::EditorAssetBrowserActionContextIdentifier, this);
 
             AssetBrowserViewRequestBus::Handler::BusDisconnect();
             AssetBrowserComponentNotificationBus::Handler::BusDisconnect();

+ 7 - 13
Code/Framework/AzToolsFramework/AzToolsFramework/ComponentMode/ComponentModeActionHandler.cpp

@@ -23,24 +23,18 @@ namespace AzToolsFramework
 {
     ComponentModeActionHandler::ComponentModeActionHandler()
     {
-        if (IsNewActionManagerEnabled())
-        {
-            AzFramework::EntityContextId editorEntityContextId = AzFramework::EntityContextId::CreateNull();
-            EditorEntityContextRequestBus::BroadcastResult(editorEntityContextId, &EditorEntityContextRequests::GetEditorEntityContextId);
+        AzFramework::EntityContextId editorEntityContextId = AzFramework::EntityContextId::CreateNull();
+        EditorEntityContextRequestBus::BroadcastResult(editorEntityContextId, &EditorEntityContextRequests::GetEditorEntityContextId);
 
-            ActionManagerRegistrationNotificationBus::Handler::BusConnect();
-            ComponentModeFramework::EditorComponentModeNotificationBus::Handler::BusConnect(editorEntityContextId);
-            ViewportEditorModeNotificationsBus::Handler::BusConnect(editorEntityContextId);
-        }
+        ActionManagerRegistrationNotificationBus::Handler::BusConnect();
+        ComponentModeFramework::EditorComponentModeNotificationBus::Handler::BusConnect(editorEntityContextId);
+        ViewportEditorModeNotificationsBus::Handler::BusConnect(editorEntityContextId);
     }
 
     ComponentModeActionHandler::~ComponentModeActionHandler()
     {
-        if (IsNewActionManagerEnabled())
-        {
-            ComponentModeFramework::EditorComponentModeNotificationBus::Handler::BusDisconnect();
-            ActionManagerRegistrationNotificationBus::Handler::BusDisconnect();
-        }
+        ComponentModeFramework::EditorComponentModeNotificationBus::Handler::BusDisconnect();
+        ActionManagerRegistrationNotificationBus::Handler::BusDisconnect();
     }
 
     void ComponentModeActionHandler::OnActionContextModeRegistrationHook()

+ 3 - 6
Code/Framework/AzToolsFramework/AzToolsFramework/Manipulators/EditorVertexSelection.cpp

@@ -96,12 +96,9 @@ namespace AzToolsFramework
 
     void OnVertexSelectionCountChanged()
     {
-        if (AzToolsFramework::IsNewActionManagerEnabled())
-        {
-            auto actionManagerInterface = AZ::Interface<AzToolsFramework::ActionManagerInterface>::Get();
-            AZ_Assert(actionManagerInterface, "EditorVertexSelection - could not get ActionManagerInterface.");
-            actionManagerInterface->TriggerActionUpdater(EditorIdentifiers::VertexSelectionChangedUpdaterIdentifier);
-        }
+        auto actionManagerInterface = AZ::Interface<AzToolsFramework::ActionManagerInterface>::Get();
+        AZ_Assert(actionManagerInterface, "EditorVertexSelection - could not get ActionManagerInterface.");
+        actionManagerInterface->TriggerActionUpdater(EditorIdentifiers::VertexSelectionChangedUpdaterIdentifier);
     }
 
     void EditorVertexSelectionActionManagement::RegisterEditorVertexSelectionActions()

+ 2 - 110
Code/Framework/AzToolsFramework/AzToolsFramework/UI/Outliner/EntityOutlinerWidget.cpp

@@ -590,108 +590,9 @@ namespace AzToolsFramework
             return;
         }
 
-        if (IsNewActionManagerEnabled())
+        if (auto menuManagerInterface = AZ::Interface<MenuManagerInterface>::Get())
         {
-            if (auto menuManagerInterface = AZ::Interface<MenuManagerInterface>::Get())
-            {
-                menuManagerInterface->DisplayMenuUnderCursor(EditorIdentifiers::EntityOutlinerContextMenuIdentifier);
-            }
-        }
-        else
-        {
-            QMenu* contextMenu = new QMenu(this);
-
-            // Populate global context menu.
-            AzToolsFramework::EditorContextMenuBus::Broadcast(
-                &AzToolsFramework::EditorContextMenuEvents::PopulateEditorGlobalContextMenu,
-                contextMenu,
-                AZStd::nullopt,
-                EditorEvents::eECMF_HIDE_ENTITY_CREATION);
-
-            PrepareSelection();
-
-            // Remove the "Find in Entity Outliner" option from the context menu
-            for (QAction* action : contextMenu->actions())
-            {
-                if (action->text() == "Find in Entity Outliner")
-                {
-                    contextMenu->removeAction(action);
-                    break;
-                }
-            }
-
-            // register rename menu action
-            if (!m_selectedEntityIds.empty())
-            {
-                contextMenu->addSeparator();
-
-                if (m_selectedEntityIds.size() == 1)
-                {
-                    auto entityId = m_selectedEntityIds.front();
-
-                    // Only allow renaming the entity if the UI Handler did not block it.
-                    auto entityUiHandler = m_editorEntityUiInterface->GetHandler(entityId);
-                    bool canRename = !entityUiHandler || entityUiHandler->CanRename(entityId);
-
-                    // Disable renaming for read-only entities.
-                    bool isReadOnly = m_readOnlyEntityPublicInterface->IsReadOnly(entityId);
-
-                    if (canRename && !isReadOnly)
-                    {
-                        contextMenu->addAction(m_actionToRenameSelection);
-                    }
-                }
-
-                if (m_selectedEntityIds.size() == 1)
-                {
-                    AZ::EntityId entityId = m_selectedEntityIds[0];
-
-                    // Don't allow moving the entity if it's the focus root.
-                    if (m_focusModeInterface->GetFocusRoot(m_editorEntityContextId) != entityId)
-                    {
-                        AZ::EntityId parentId;
-                        EditorEntityInfoRequestBus::EventResult(parentId, entityId, &EditorEntityInfoRequestBus::Events::GetParent);
-
-                        EntityOrderArray entityOrderArray = GetEntityChildOrder(parentId);
-
-                        if (entityOrderArray.size() > 1)
-                        {
-                            if (AZStd::find(entityOrderArray.begin(), entityOrderArray.end(), entityId) != entityOrderArray.end())
-                            {
-                                if (entityOrderArray.front() != entityId)
-                                {
-                                    contextMenu->addAction(m_actionToMoveEntityUp);
-                                }
-
-                                if (entityOrderArray.back() != entityId)
-                                {
-                                    contextMenu->addAction(m_actionToMoveEntityDown);
-                                }
-                            }
-                        }
-                    }
-                }
-
-                contextMenu->addSeparator();
-
-                bool canGoToEntitiesInViewport = true;
-                EditorRequestBus::BroadcastResult(canGoToEntitiesInViewport, &EditorRequestBus::Events::CanGoToSelectedEntitiesInViewports);
-                if (!canGoToEntitiesInViewport)
-                {
-                    m_actionGoToEntitiesInViewport->setEnabled(false);
-                    m_actionGoToEntitiesInViewport->setToolTip(
-                        QObject::tr("The selection contains no entities that exist in the viewport."));
-                }
-                else
-                {
-                    m_actionGoToEntitiesInViewport->setEnabled(true);
-                    m_actionGoToEntitiesInViewport->setToolTip(QObject::tr("Moves the viewports to the bounding box for the selection."));
-                }
-                contextMenu->addAction(m_actionGoToEntitiesInViewport);
-            }
-
-            contextMenu->exec(m_gui->m_objectTree->mapToGlobal(pos));
-            delete contextMenu;
+            menuManagerInterface->DisplayMenuUnderCursor(EditorIdentifiers::EntityOutlinerContextMenuIdentifier);
         }
     }
 
@@ -893,15 +794,6 @@ namespace AzToolsFramework
         connect(m_actionToDeleteSelection, &QAction::triggered, this, &EntityOutlinerWidget::DoDeleteSelection);
         addAction(m_actionToDeleteSelection);
 
-        if (!IsNewActionManagerEnabled())
-        {
-            m_actionToDeleteSelectionAndDescendants = new QAction(tr("Delete Selection And Descendants"), this);
-            m_actionToDeleteSelectionAndDescendants->setShortcut(QKeySequence::Delete);
-            m_actionToDeleteSelectionAndDescendants->setShortcutContext(Qt::WidgetWithChildrenShortcut);
-            connect(m_actionToDeleteSelectionAndDescendants, &QAction::triggered, this, &EntityOutlinerWidget::DoDeleteSelectionAndDescendants);
-            addAction(m_actionToDeleteSelectionAndDescendants);
-        }
-
         m_actionToRenameSelection = new QAction(tr("Rename"), this);
     #if defined(Q_OS_MAC)
         // "Alt+Return" translates to Option+Return on macOS

+ 15 - 498
Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/PrefabIntegrationManager.cpp

@@ -121,55 +121,37 @@ namespace AzToolsFramework
             auto prefabFocusInterface = AZ::Interface<PrefabFocusInterface>::Get();
             prefabFocusInterface->InitializeEditorInterfaces();
 
-            if (IsNewActionManagerEnabled())
-            {
-                m_actionManagerInterface = AZ::Interface<ActionManagerInterface>::Get();
-                AZ_Assert(
-                    m_actionManagerInterface, "Prefab - could not get ActionManagerInterface on PrefabIntegrationManager construction.");
-
-                m_hotKeyManagerInterface = AZ::Interface<HotKeyManagerInterface>::Get();
-                AZ_Assert(
-                    m_hotKeyManagerInterface, "Prefab - could not get HotKeyManagerInterface on PrefabIntegrationManager construction.");
+            m_actionManagerInterface = AZ::Interface<ActionManagerInterface>::Get();
+            AZ_Assert(
+                m_actionManagerInterface, "Prefab - could not get ActionManagerInterface on PrefabIntegrationManager construction.");
 
-                m_menuManagerInterface = AZ::Interface<MenuManagerInterface>::Get();
-                AZ_Assert(
-                    m_menuManagerInterface, "Prefab - could not get MenuManagerInterface on PrefabIntegrationManager construction.");
+            m_hotKeyManagerInterface = AZ::Interface<HotKeyManagerInterface>::Get();
+            AZ_Assert(
+                m_hotKeyManagerInterface, "Prefab - could not get HotKeyManagerInterface on PrefabIntegrationManager construction.");
 
-                m_toolBarManagerInterface = AZ::Interface<ToolBarManagerInterface>::Get();
-                AZ_Assert(
-                    m_toolBarManagerInterface, "Prefab - could not get ToolBarManagerInterface on PrefabIntegrationManager construction.");
+            m_menuManagerInterface = AZ::Interface<MenuManagerInterface>::Get();
+            AZ_Assert(
+                m_menuManagerInterface, "Prefab - could not get MenuManagerInterface on PrefabIntegrationManager construction.");
 
-                // Register an updater that will refresh actions when a level is loaded.
-                if (m_actionManagerInterface)
-                {
-                    ActionManagerRegistrationNotificationBus::Handler::BusConnect();
-                }
-            }
+            m_toolBarManagerInterface = AZ::Interface<ToolBarManagerInterface>::Get();
+            AZ_Assert(
+                m_toolBarManagerInterface, "Prefab - could not get ToolBarManagerInterface on PrefabIntegrationManager construction.");
 
-            // New Action Manager handler Escape by registering an action.
-            if (!IsNewActionManagerEnabled())
+            // Register an updater that will refresh actions when a level is loaded.
+            if (m_actionManagerInterface)
             {
-                EditorEventsBus::Handler::BusConnect();
+                ActionManagerRegistrationNotificationBus::Handler::BusConnect();
             }
             
-            EditorContextMenuBus::Handler::BusConnect();
             PrefabFocusNotificationBus::Handler::BusConnect(s_editorEntityContextId);
             PrefabInstanceContainerNotificationBus::Handler::BusConnect();
             AZ::Interface<PrefabIntegrationInterface>::Register(this);
             EditorEntityContextNotificationBus::Handler::BusConnect();
             PrefabPublicNotificationBus::Handler::BusConnect();
-
-            // New Action Manager uses the same actions for menus and shortcuts, no need to initialize them separately.
-            if (!IsNewActionManagerEnabled())
-            {
-                InitializeShortcuts();
-            }
         }
 
         PrefabIntegrationManager::~PrefabIntegrationManager()
         {
-            UninitializeShortcuts();
-
             if (m_actionManagerInterface)
             {
                 ActionManagerRegistrationNotificationBus::Handler::BusDisconnect();
@@ -180,12 +162,6 @@ namespace AzToolsFramework
             AZ::Interface<PrefabIntegrationInterface>::Unregister(this);
             PrefabInstanceContainerNotificationBus::Handler::BusDisconnect();
             PrefabFocusNotificationBus::Handler::BusDisconnect();
-            EditorContextMenuBus::Handler::BusDisconnect();
-
-            if (!IsNewActionManagerEnabled())
-            {
-                EditorEventsBus::Handler::BusDisconnect();
-            }
         }
 
         void PrefabIntegrationManager::Reflect(AZ::ReflectContext* context)
@@ -193,74 +169,6 @@ namespace AzToolsFramework
             PrefabUserSettings::Reflect(context);
         }
 
-        void PrefabIntegrationManager::InitializeShortcuts()
-        {
-            // Open/Edit Prefab (+)
-            // We also support = to enable easier editing on compact US keyboards.
-            {
-                m_actions.emplace_back(AZStd::make_unique<QAction>(nullptr));
-
-                m_actions.back()->setShortcuts({ QKeySequence(Qt::Key_Plus), QKeySequence(Qt::Key_Equal) });
-                m_actions.back()->setText("Open/Edit Prefab");
-                m_actions.back()->setStatusTip("Edit the prefab in focus mode.");
-
-                QObject::connect(
-                    m_actions.back().get(), &QAction::triggered, m_actions.back().get(),
-                    [this]
-                    {
-                        AzToolsFramework::EntityIdList selectedEntities;
-                        AzToolsFramework::ToolsApplicationRequestBus::BroadcastResult(
-                            selectedEntities, &AzToolsFramework::ToolsApplicationRequests::GetSelectedEntities);
-
-                        if (selectedEntities.size() != 1)
-                        {
-                            return;
-                        }
-
-                        AZ::EntityId selectedEntity = selectedEntities[0];
-
-                        if (!s_prefabPublicInterface->IsInstanceContainerEntity(selectedEntity))
-                        {
-                            return;
-                        }
-
-                        if (!s_prefabFocusPublicInterface->IsOwningPrefabBeingFocused(selectedEntity))
-                        {
-                            ContextMenu_EditPrefab(selectedEntity);
-                        }
-                    });
-
-                EditorActionRequestBus::Broadcast(
-                    &EditorActionRequests::AddActionViaBusCrc, AZ_CRC_CE("org.o3de.action.editortransform.prefabopen"),
-                    m_actions.back().get());
-            }
-
-            // Close Prefab (-)
-            {
-                m_actions.emplace_back(AZStd::make_unique<QAction>(nullptr));
-
-                m_actions.back()->setShortcuts({ QKeySequence(Qt::Key_Minus) });
-                m_actions.back()->setText("Close Prefab");
-                m_actions.back()->setStatusTip("Close focus mode for this prefab and move one level up.");
-
-                QObject::connect(
-                    m_actions.back().get(), &QAction::triggered, m_actions.back().get(),
-                    [this]
-                    {
-                        ContextMenu_ClosePrefab();
-                    });
-
-                EditorActionRequestBus::Broadcast(
-                    &EditorActionRequests::AddActionViaBusCrc, AZ_CRC_CE("org.o3de.action.editortransform.prefabclose"),
-                    m_actions.back().get());
-            }
-        }
-
-        void PrefabIntegrationManager::UninitializeShortcuts()
-        {
-            m_actions.clear();
-        }
-
         void PrefabIntegrationManager::OnActionUpdaterRegistrationHook()
         {
             // Update actions whenever a new root prefab is loaded.
@@ -1032,397 +940,6 @@ namespace AzToolsFramework
                 PrefabIdentifiers::PrefabInstancePropagationEndUpdaterIdentifier, "o3de.action.entitySorting.moveDown");
         }
 
-        int PrefabIntegrationManager::GetMenuPosition() const
-        {
-            return aznumeric_cast<int>(EditorContextMenuOrdering::MIDDLE);
-        }
-
-        AZStd::string PrefabIntegrationManager::GetMenuIdentifier() const
-        {
-            return "Prefabs";
-        }
-
-        void PrefabIntegrationManager::PopulateEditorGlobalContextMenu(
-            QMenu* menu, [[maybe_unused]] const AZStd::optional<AzFramework::ScreenPoint>& point, [[maybe_unused]] int flags)
-        {
-            AzToolsFramework::EntityIdList selectedEntities;
-            AzToolsFramework::ToolsApplicationRequestBus::BroadcastResult(
-                selectedEntities, &AzToolsFramework::ToolsApplicationRequests::GetSelectedEntities);
-
-            bool prefabWipFeaturesEnabled = false;
-            AzFramework::ApplicationRequests::Bus::BroadcastResult(
-                prefabWipFeaturesEnabled, &AzFramework::ApplicationRequests::ArePrefabWipFeaturesEnabled);
-
-            bool readOnlyEntityInSelection = false;
-            for (const auto& entityId : selectedEntities)
-            {
-                if (m_readOnlyEntityPublicInterface->IsReadOnly(entityId))
-                {
-                    readOnlyEntityInSelection = true;
-                    break;
-                }
-            }
-
-            bool onlySelectedEntityIsFocusedPrefabContainer = false;
-            bool onlySelectedEntityIsClosedPrefabContainer = false;
-
-            if (selectedEntities.size() == 1)
-            {
-                AZ::EntityId selectedEntity = selectedEntities.front();
-
-                if (s_prefabPublicInterface->IsInstanceContainerEntity(selectedEntity))
-                {
-                    if (s_prefabFocusPublicInterface->IsOwningPrefabBeingFocused(selectedEntity))
-                    {
-                        onlySelectedEntityIsFocusedPrefabContainer = true;
-                    }
-                    else
-                    {
-                        onlySelectedEntityIsClosedPrefabContainer = true;
-                    }
-                }
-            }
-
-            // Edit/Inspect/Close Prefab
-            {
-                if (selectedEntities.size() == 1)
-                {
-                    AZ::EntityId selectedEntity = selectedEntities[0];
-
-                    if (s_prefabPublicInterface->IsInstanceContainerEntity(selectedEntity))
-                    {
-                        if (!s_prefabFocusPublicInterface->IsOwningPrefabBeingFocused(selectedEntity))
-                        {
-                            if (s_prefabPublicInterface->IsOwnedByProceduralPrefabInstance(selectedEntity))
-                            {
-                                // Inspect Prefab
-                                QAction* editAction = menu->addAction(QObject::tr("Inspect Procedural Prefab"));
-                                editAction->setShortcut(QKeySequence(Qt::Key_Plus));
-                                editAction->setToolTip(QObject::tr("See the procedural prefab contents in focus mode."));
-
-                                QObject::connect(
-                                    editAction, &QAction::triggered, editAction,
-                                    [this, selectedEntity]
-                                    {
-                                        ContextMenu_EditPrefab(selectedEntity);
-                                    }
-                                );
-                            }
-                            else
-                            {
-                                // Edit Prefab
-                                QAction* editAction = menu->addAction(QObject::tr("Open/Edit Prefab"));
-                                editAction->setShortcut(QKeySequence(Qt::Key_Plus));
-                                editAction->setToolTip(QObject::tr("Edit the prefab in focus mode."));
-
-                                QObject::connect(
-                                    editAction, &QAction::triggered, editAction,
-                                    [this, selectedEntity]
-                                    {
-                                        ContextMenu_EditPrefab(selectedEntity);
-                                    }
-                                );
-                            }
-
-                            if (IsOutlinerOverrideManagementEnabled())
-                            {
-                                if (!s_containerEntityInterface->IsContainerOpen(selectedEntity))
-                                {
-                                    // Open Prefab Instance
-                                    QAction* overrideAction = menu->addAction(QObject::tr("Override Prefab Instance"));
-                                    overrideAction->setToolTip(QObject::tr("Open the prefab instance to apply overrides."));
-
-                                    QObject::connect(
-                                        overrideAction, &QAction::triggered, overrideAction,
-                                        [this, selectedEntity]
-                                    {
-                                        ContextMenu_OpenPrefabInstance(selectedEntity);
-                                    }
-                                    );
-                                }
-                                else
-                                {
-                                    // Close Prefab
-                                    QAction* closeAction = menu->addAction(QObject::tr("Close Prefab Instance"));
-                                    closeAction->setToolTip(QObject::tr("Close this prefab instance."));
-
-                                    QObject::connect(
-                                        closeAction, &QAction::triggered, closeAction,
-                                        [this, selectedEntity]
-                                    {
-                                        ContextMenu_ClosePrefabInstance(selectedEntity);
-                                    }
-                                    );
-                                }
-                            }                           
-                        }
-                        else if (selectedEntity != s_prefabPublicInterface->GetLevelInstanceContainerEntityId())
-                        {
-                            // Close Prefab
-                            QAction* closeAction = menu->addAction(QObject::tr("Close Prefab"));
-                            closeAction->setShortcut(QKeySequence(Qt::Key_Minus));
-                            closeAction->setToolTip(QObject::tr("Close focus mode for this prefab and move one level up."));
-
-                            QObject::connect(
-                                closeAction, &QAction::triggered, closeAction,
-                                [this]
-                                {
-                                    ContextMenu_ClosePrefab();
-                                }
-                            );
-                        }
-
-                        menu->addSeparator();
-                    }
-                }
-            }
-
-            bool itemWasShown = false;
-
-            // Create Prefab
-            {
-                if (!selectedEntities.empty())
-                {
-                    // Hide if the only selected entity is the Focused Instance Container
-                    if (!onlySelectedEntityIsFocusedPrefabContainer)
-                    {
-                        bool layerInSelection = false;
-
-                        for (AZ::EntityId entityId : selectedEntities)
-                        {
-                            if (!layerInSelection)
-                            {
-                                AzToolsFramework::Layers::EditorLayerComponentRequestBus::EventResult(
-                                    layerInSelection, entityId,
-                                    &AzToolsFramework::Layers::EditorLayerComponentRequestBus::Events::HasLayer);
-
-                                if (layerInSelection)
-                                {
-                                    break;
-                                }
-                            }
-                        }
-
-                        // Layers can't be in prefabs.
-                        // Also don't allow to create a prefab if any of the selected entities are read-only
-                        if (!layerInSelection && !readOnlyEntityInSelection)
-                        {
-                            if (s_prefabPublicInterface->EntitiesBelongToSameInstance(selectedEntities))
-                            {
-                                AZ::EntityId entityToCheck = selectedEntities[0];
-
-                                // If it is a container entity, then check its parent entity's owning instance instead.
-                                if (s_prefabPublicInterface->IsInstanceContainerEntity(entityToCheck))
-                                {
-                                    AZ::TransformBus::EventResult(entityToCheck, entityToCheck, &AZ::TransformBus::Events::GetParentId);
-                                }
-
-                                // Do not show the option when it is not a prefab edit.
-                                if (s_prefabFocusPublicInterface->IsOwningPrefabBeingFocused(entityToCheck))
-                                {
-                                    QAction* createAction = menu->addAction(QObject::tr("Create Prefab..."));
-                                    createAction->setToolTip(QObject::tr("Creates a prefab out of the currently selected entities."));
-
-                                    QObject::connect(
-                                        createAction, &QAction::triggered, createAction,
-                                        [this, selectedEntities]
-                                        {
-                                            ContextMenu_CreatePrefab(selectedEntities);
-                                        });
-
-                                    itemWasShown = true;
-                                }
-                            }
-                        }
-                    }
-                }
-            }
-
-            // Detach Prefab
-            if (onlySelectedEntityIsClosedPrefabContainer)
-            {
-                AZ::EntityId selectedEntityId = selectedEntities.front();
-                AZ::EntityId parentEntityId;
-                AZ::TransformBus::EventResult(parentEntityId, selectedEntityId, &AZ::TransformBus::Events::GetParentId);
-
-                // Do not show the option when it is not a prefab edit.
-                if (s_prefabFocusPublicInterface->IsOwningPrefabBeingFocused(parentEntityId))
-                {
-                    QAction* detachPrefabAction = menu->addAction(QObject::tr("Detach Prefab"));
-                    QObject::connect(
-                        detachPrefabAction, &QAction::triggered, detachPrefabAction,
-                        [this, selectedEntityId]
-                        {
-                            ContextMenu_DetachPrefab(selectedEntityId);
-                        });
-                }
-            }
-
-            // Instantiate Prefab
-            // Do not show the option when it is not a prefab edit.
-            if (selectedEntities.size() == 0 || selectedEntities.size() == 1 &&
-                !readOnlyEntityInSelection && !onlySelectedEntityIsClosedPrefabContainer &&
-                s_prefabFocusPublicInterface->IsOwningPrefabBeingFocused(selectedEntities[0]))
-            {
-                QAction* instantiateAction = menu->addAction(QObject::tr("Instantiate Prefab..."));
-                instantiateAction->setToolTip(QObject::tr("Instantiates a prefab file in the scene."));
-
-                QObject::connect(
-                    instantiateAction, &QAction::triggered, instantiateAction,
-                    [this]
-                    {
-                        ContextMenu_InstantiatePrefab();
-                    }
-                );
-
-                // Instantiate Procedural Prefab
-                if (AZ::Prefab::ProceduralPrefabAsset::UseProceduralPrefabs())
-                {
-                    QAction* action = menu->addAction(QObject::tr("Instantiate Procedural Prefab..."));
-                    action->setToolTip(QObject::tr("Instantiates a procedural prefab file in a prefab."));
-
-                    QObject::connect(
-                        action, &QAction::triggered, action,
-                        [this]
-                        {
-                            ContextMenu_InstantiateProceduralPrefab();
-                        }
-                    );
-                }
-
-                itemWasShown = true;
-            }
-
-            if (itemWasShown)
-            {
-                menu->addSeparator();
-            }
-
-            // Save Prefab
-            {
-                if (selectedEntities.size() == 1)
-                {
-                    AZ::EntityId selectedEntity = selectedEntities[0];
-
-                    if (s_prefabPublicInterface->IsInstanceContainerEntity(selectedEntity))
-                    {
-                        // Save Prefab
-                        AZ::IO::Path prefabFilePath = s_prefabPublicInterface->GetOwningInstancePrefabPath(selectedEntity);
-                        auto dirtyOutcome = s_prefabPublicInterface->HasUnsavedChanges(prefabFilePath);
-
-                        if (dirtyOutcome.IsSuccess() && dirtyOutcome.GetValue() == true)
-                        {
-                            QAction* saveAction = menu->addAction(QObject::tr("Save Prefab to file"));
-                            saveAction->setToolTip(QObject::tr("Save the changes to the prefab to disk."));
-
-                            QObject::connect(
-                                saveAction, &QAction::triggered, saveAction,
-                                [this, selectedEntity]
-                                {
-                                    ContextMenu_SavePrefab(selectedEntity);
-                                }
-                            );
-
-                            menu->addSeparator();
-                        }
-                    }
-                }
-            }
-
-            if (!selectedEntities.empty())
-            {
-                // Don't allow duplication if any of the selected entities are direct descendants of a read-only entity
-                bool selectionContainsDescendantOfReadOnlyEntity = false;
-                for (const auto& entityId : selectedEntities)
-                {
-                    AZ::EntityId parentEntityId;
-                    AZ::TransformBus::EventResult(parentEntityId, entityId, &AZ::TransformBus::Events::GetParentId);
-
-                    if (parentEntityId.IsValid() && m_readOnlyEntityPublicInterface->IsReadOnly(parentEntityId))
-                    {
-                        selectionContainsDescendantOfReadOnlyEntity = true;
-                        break;
-                    }
-                }
-
-                if (!selectionContainsDescendantOfReadOnlyEntity)
-                {
-                    if (s_prefabPublicInterface->EntitiesBelongToSameInstance(selectedEntities))
-                    {
-                        AZ::EntityId entityToCheck = selectedEntities[0];
-
-                        // If it is a container entity, then check its parent entity's owning instance instead.
-                        if (s_prefabPublicInterface->IsInstanceContainerEntity(entityToCheck))
-                        {
-                            AZ::TransformBus::EventResult(entityToCheck, entityToCheck, &AZ::TransformBus::Events::GetParentId);
-                        }
-
-                        // Do not show the option when it is not a prefab edit.
-                        if (s_prefabFocusPublicInterface->IsOwningPrefabBeingFocused(entityToCheck))
-                        {
-                            QAction* duplicateAction = menu->addAction(QObject::tr("Duplicate"));
-                            duplicateAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_D));
-                            QObject::connect(
-                                duplicateAction, &QAction::triggered, duplicateAction,
-                                [this]
-                                {
-                                    ContextMenu_Duplicate();
-                                });
-                        }
-                    }
-                }
-            }
-
-            if (!selectedEntities.empty() &&
-                (selectedEntities.size() != 1 ||
-                 selectedEntities[0] != s_prefabFocusPublicInterface->GetFocusedPrefabContainerEntityId(s_editorEntityContextId)) &&
-                !readOnlyEntityInSelection)
-            {
-                QAction* deleteAction = menu->addAction(QObject::tr("Delete"));
-                deleteAction->setShortcut(QKeySequence(Qt::Key_Delete));
-                QObject::connect(
-                    deleteAction, &QAction::triggered, deleteAction,
-                    [this]
-                    {
-                        ContextMenu_DeleteSelected();
-                    }
-                );
-            }
-
-            // Revert Overrides
-            {
-                if (IsOutlinerOverrideManagementEnabled() && selectedEntities.size() == 1)
-                {
-                    AZ::EntityId selectedEntity = selectedEntities[0];
-
-                    if (s_prefabPublicInterface->IsOwnedByPrefabInstance(selectedEntity) &&
-                        !s_prefabPublicInterface->IsInstanceContainerEntity(selectedEntity) &&
-                        m_prefabOverridePublicInterface->AreOverridesPresent(selectedEntity))
-                    {
-                        QAction* revertAction = menu->addAction(QObject::tr("Revert Overrides"));
-                        revertAction->setToolTip(QObject::tr("Revert all overrides on this entity."));
-                        if (m_prefabOverridePublicInterface->GetEntityOverrideType(selectedEntity) == OverrideType::AddEntity)
-                        {
-                            revertAction->setToolTip(QObject::tr("Cannot revert overrides on entities that are added as overrides. Use Delete instead."));
-                            revertAction->setEnabled(false);
-                        }
-                        QObject::connect(
-                            revertAction,
-                            &QAction::triggered,
-                            revertAction,
-                            [this, selectedEntity]
-                            {
-                                ContextMenu_RevertOverrides(selectedEntity);
-                            });
-
-                        menu->addSeparator();
-                    }
-                }
-            }
-
-            menu->addSeparator();
-        }
-
         void PrefabIntegrationManager::OnEscape()
         {
             s_prefabFocusPublicInterface->FocusOnOwningPrefab(AZ::EntityId());

+ 0 - 15
Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/PrefabIntegrationManager.h

@@ -12,7 +12,6 @@
 
 #include <AzToolsFramework/ActionManager/ActionManagerRegistrationNotificationBus.h>
 #include <AzToolsFramework/API/ToolsApplicationAPI.h>
-#include <AzToolsFramework/Editor/EditorContextMenuBus.h>
 #include <AzToolsFramework/Entity/EditorEntityContextBus.h>
 #include <AzToolsFramework/Prefab/PrefabFocusNotificationBus.h>
 #include <AzToolsFramework/Prefab/PrefabPublicNotificationBus.h>
@@ -42,8 +41,6 @@ namespace AzToolsFramework
         class PrefabPublicInterface;
 
         class PrefabIntegrationManager final
-            : public EditorContextMenuBus::Handler
-            , public EditorEventsBus::Handler
             , public PrefabInstanceContainerNotificationBus::Handler
             , public PrefabIntegrationInterface
             , private PrefabFocusNotificationBus::Handler
@@ -59,14 +56,6 @@ namespace AzToolsFramework
 
             static void Reflect(AZ::ReflectContext* context);
 
-            // EditorContextMenuBus overrides ...
-            int GetMenuPosition() const override;
-            AZStd::string GetMenuIdentifier() const override;
-            void PopulateEditorGlobalContextMenu(QMenu* menu, const AZStd::optional<AzFramework::ScreenPoint>& point, int flags) override;
-
-            // EditorEventsBus overrides ...
-            void OnEscape() override;
-
             // EditorEntityContextNotificationBus overrides ...
             void OnStartPlayInEditorBegin() override;
             void OnStopPlayInEditor() override;
@@ -133,10 +122,6 @@ namespace AzToolsFramework
             void ContextMenu_DetachPrefab(AZ::EntityId containerEntity);
             void ContextMenu_RevertOverrides(AZ::EntityId entityId);
 
-            // Shortcut setup handlers (for legacy action manager)
-            void InitializeShortcuts();
-            void UninitializeShortcuts();
-
             // Reference detection
             static void GatherAllReferencedEntitiesAndCompare(
                 const EntityIdSet& entities, EntityIdSet& entitiesAndReferencedEntities, bool& hasExternalReferences);

+ 3 - 9
Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/EntityPropertyEditor.cpp

@@ -669,11 +669,8 @@ namespace AzToolsFramework
 
     EntityPropertyEditor::~EntityPropertyEditor()
     {
-        if (IsNewActionManagerEnabled())
-        {
-            RemoveWidgetFromActionContextHelper(
-                    EditorIdentifiers::EditorEntityPropertyEditorActionContextIdentifier, this);
-        }
+        RemoveWidgetFromActionContextHelper(
+                EditorIdentifiers::EditorEntityPropertyEditorActionContextIdentifier, this);
 
         qApp->removeEventFilter(this);
 
@@ -3471,10 +3468,7 @@ namespace AzToolsFramework
 
     void EntityPropertyEditor::CreateActions()
     {
-        if (AzToolsFramework::IsNewActionManagerEnabled())
-        {
-            m_actionManagerInterface = AZ::Interface<AzToolsFramework::ActionManagerInterface>::Get();
-        }
+        m_actionManagerInterface = AZ::Interface<AzToolsFramework::ActionManagerInterface>::Get();
 
         m_actionToAddComponents = new QAction(tr("Add component"), this);
         m_actionToAddComponents->setShortcutContext(Qt::WidgetWithChildrenShortcut);

+ 30 - 36
Code/Framework/AzToolsFramework/AzToolsFramework/UnitTest/AzToolsFrameworkTestHelpers.h

@@ -310,26 +310,23 @@ namespace UnitTest
                 GetEntityContextId(), &EditorInteractionSystemViewportSelectionRequestBus::Events::SetHandler,
                 viewportHandlerBuilder);
 
-            // If the new action manager is enabled, we need to register the MainWindowActionContextIdentifier action context to a dummy QMainWindow
+            // We need to register the MainWindowActionContextIdentifier action context to a dummy QMainWindow for the Action Manager
             // so that any actions/shortcuts registered to it from tools will work. This is typically only initialized in the Editor itself,
             // so it doesn't get registered in the ToolsApplicationFixture, but some tools we are testing rely on it (e.g. viewport interactions).
-            if (AzToolsFramework::IsNewActionManagerEnabled())
-            {
-                m_defaultMainWindow = new QMainWindow();
+            m_defaultMainWindow = new QMainWindow();
 
-                auto actionManagerInterface = AZ::Interface<AzToolsFramework::ActionManagerInterface>::Get();
-                auto hotKeyManagerInterface = AZ::Interface<AzToolsFramework::HotKeyManagerInterface>::Get();
+            auto actionManagerInterface = AZ::Interface<AzToolsFramework::ActionManagerInterface>::Get();
+            auto hotKeyManagerInterface = AZ::Interface<AzToolsFramework::HotKeyManagerInterface>::Get();
 
-                AzToolsFramework::ActionContextProperties contextProperties;
-                contextProperties.m_name = "O3DE Editor";
+            AzToolsFramework::ActionContextProperties contextProperties;
+            contextProperties.m_name = "O3DE Editor";
 
-                actionManagerInterface->RegisterActionContext(
-                    EditorIdentifiers::MainWindowActionContextIdentifier, contextProperties);
+            actionManagerInterface->RegisterActionContext(
+                EditorIdentifiers::MainWindowActionContextIdentifier, contextProperties);
 
-                hotKeyManagerInterface->AssignWidgetToActionContext(EditorIdentifiers::MainWindowActionContextIdentifier, m_defaultMainWindow);
+            hotKeyManagerInterface->AssignWidgetToActionContext(EditorIdentifiers::MainWindowActionContextIdentifier, m_defaultMainWindow);
 
-                AzToolsFramework::ActionManagerSystemComponent::TriggerRegistrationNotifications();
-            }
+            AzToolsFramework::ActionManagerSystemComponent::TriggerRegistrationNotifications();
 
             SetUpEditorFixtureImpl();
         }
@@ -339,30 +336,27 @@ namespace UnitTest
             using AzToolsFramework::GetEntityContextId;
             using AzToolsFramework::EditorInteractionSystemViewportSelectionRequestBus;
             
-            // If the new action manager is enabled, reset it between test runs.
-            if (AzToolsFramework::IsNewActionManagerEnabled())
+            // Reset the Action Manager between test runs.
+            auto hotKeyManagerInterface = AZ::Interface<AzToolsFramework::HotKeyManagerInterface>::Get();
+
+            hotKeyManagerInterface->RemoveWidgetFromActionContext(
+                EditorIdentifiers::MainWindowActionContextIdentifier, m_defaultMainWindow);
+
+            if (auto actionManagerInternalInterface = AZ::Interface<AzToolsFramework::ActionManagerInternalInterface>::Get())
+            {
+                actionManagerInternalInterface->Reset();
+            }
+            if (auto hotKeyManagerInternalInterface = AZ::Interface<AzToolsFramework::HotKeyManagerInternalInterface>::Get())
+            {
+                hotKeyManagerInternalInterface->Reset();
+            }
+            if (auto menuManagerInternalInterface = AZ::Interface<AzToolsFramework::MenuManagerInternalInterface>::Get())
+            {
+                menuManagerInternalInterface->Reset();
+            }
+            if (auto toolBarManagerInternalInterface = AZ::Interface<AzToolsFramework::ToolBarManagerInternalInterface>::Get())
             {
-                auto hotKeyManagerInterface = AZ::Interface<AzToolsFramework::HotKeyManagerInterface>::Get();
-
-                hotKeyManagerInterface->RemoveWidgetFromActionContext(
-                    EditorIdentifiers::MainWindowActionContextIdentifier, m_defaultMainWindow);
-
-                if (auto actionManagerInternalInterface = AZ::Interface<AzToolsFramework::ActionManagerInternalInterface>::Get())
-                {
-                    actionManagerInternalInterface->Reset();
-                }
-                if (auto hotKeyManagerInternalInterface = AZ::Interface<AzToolsFramework::HotKeyManagerInternalInterface>::Get())
-                {
-                    hotKeyManagerInternalInterface->Reset();
-                }
-                if (auto menuManagerInternalInterface = AZ::Interface<AzToolsFramework::MenuManagerInternalInterface>::Get())
-                {
-                    menuManagerInternalInterface->Reset();
-                }
-                if (auto toolBarManagerInternalInterface = AZ::Interface<AzToolsFramework::ToolBarManagerInternalInterface>::Get())
-                {
-                    toolBarManagerInternalInterface->Reset();
-                }
+                toolBarManagerInternalInterface->Reset();
             }
 
             // Reset back to Default Handler to prevent having a handler with dangling "this" pointer

+ 3 - 32
Code/Framework/AzToolsFramework/AzToolsFramework/Viewport/EditorContextMenu.cpp

@@ -47,39 +47,10 @@ namespace AzToolsFramework
             if ((currentScreenCoords - contextMenu.m_clickPoint).manhattanLength() < ed_contextMenuDisplayThreshold &&
                 !mouseInteraction.m_captured)
             {
-                if (IsNewActionManagerEnabled())
+                auto menuManagerInterface = AZ::Interface<MenuManagerInterface>::Get();
+                if (menuManagerInterface)
                 {
-                    auto menuManagerInterface = AZ::Interface<MenuManagerInterface>::Get();
-                    if (menuManagerInterface)
-                    {
-                        menuManagerInterface->DisplayMenuUnderCursor(EditorIdentifiers::ViewportContextMenuIdentifier);
-                    }
-                }
-                else
-                {
-                    QWidget* parent = nullptr;
-                    ViewportInteraction::MainEditorViewportInteractionRequestBus::EventResult(
-                        parent,
-                        mouseInteraction.m_mouseInteraction.m_interactionId.m_viewportId,
-                        &ViewportInteraction::MainEditorViewportInteractionRequestBus::Events::GetWidgetForViewportContextMenu);
-
-                    contextMenu.m_menu = new QMenu(parent);
-                    contextMenu.m_menu->setAttribute(Qt::WA_DeleteOnClose);
-                    contextMenu.m_menu->setParent(parent);
-
-                    // populate global context menu.
-                    const int contextMenuFlag = 0;
-                    AzToolsFramework::EditorContextMenuBus::Broadcast(
-                        &AzToolsFramework::EditorContextMenuEvents::PopulateEditorGlobalContextMenu,
-                        contextMenu.m_menu.data(),
-                        mouseInteraction.m_mouseInteraction.m_mousePick.m_screenCoordinates,
-                        contextMenuFlag);
-
-                    if (!contextMenu.m_menu->isEmpty())
-                    {
-                        // use popup instead of exec; this avoids blocking input event processing while the menu dialog is active
-                        contextMenu.m_menu->popup(QCursor::pos());
-                    }
+                    menuManagerInterface->DisplayMenuUnderCursor(EditorIdentifiers::ViewportContextMenuIdentifier);
                 }
             }
         }

+ 9 - 328
Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorTransformComponentSelection.cpp

@@ -1027,12 +1027,6 @@ namespace AzToolsFramework
 
         m_editorHelpers = AZStd::make_unique<EditorHelpers>(entityDataCache);
 
-        // New Action Manager registers an action to handle Escape.
-        if (!IsNewActionManagerEnabled())
-        {
-            EditorEventsBus::Handler::BusConnect();
-        }
-
         ActionManagerRegistrationNotificationBus::Handler::BusConnect();        
         EditorTransformComponentSelectionRequestBus::Handler::BusConnect(entityContextId);
         ToolsApplicationNotificationBus::Handler::BusConnect();
@@ -1051,24 +1045,17 @@ namespace AzToolsFramework
         CreateSpaceSelectionCluster();
         CreateSnappingCluster();
 
-        if (IsNewActionManagerEnabled())
-        {
-            m_actionManagerInterface = AZ::Interface<ActionManagerInterface>::Get();
-            AZ_Assert(
-                m_actionManagerInterface, "PrefabCould not get ActionManagerInterface on EditorTransformComponentSelection construction.");
+        m_actionManagerInterface = AZ::Interface<ActionManagerInterface>::Get();
+        AZ_Assert(
+            m_actionManagerInterface, "PrefabCould not get ActionManagerInterface on EditorTransformComponentSelection construction.");
 
-            m_hotKeyManagerInterface = AZ::Interface<HotKeyManagerInterface>::Get();
-            AZ_Assert(
-                m_hotKeyManagerInterface, "PrefabCould not get HotKeyManagerInterface on EditorTransformComponentSelection construction.");
+        m_hotKeyManagerInterface = AZ::Interface<HotKeyManagerInterface>::Get();
+        AZ_Assert(
+            m_hotKeyManagerInterface, "PrefabCould not get HotKeyManagerInterface on EditorTransformComponentSelection construction.");
 
-            m_menuManagerInterface = AZ::Interface<MenuManagerInterface>::Get();
-            AZ_Assert(
-                m_menuManagerInterface, "PrefabCould not get MenuManagerInterface on EditorTransformComponentSelection construction.");
-        }
-        else
-        {
-            RegisterActions();
-        }
+        m_menuManagerInterface = AZ::Interface<MenuManagerInterface>::Get();
+        AZ_Assert(
+            m_menuManagerInterface, "PrefabCould not get MenuManagerInterface on EditorTransformComponentSelection construction.");
 
         SetupBoxSelect();
         RefreshSelectedEntityIdsAndRegenerateManipulators();
@@ -1096,11 +1083,6 @@ namespace AzToolsFramework
         DestroyCluster(m_spaceCluster.m_clusterId);
         DestroyCluster(m_snappingCluster.m_clusterId);
 
-        if (!IsNewActionManagerEnabled())
-        {
-            UnregisterActions();
-        }
-
         m_pivotOverrideFrame.Reset();
 
         ReadOnlyEntityPublicNotificationBus::Handler::BusDisconnect();
@@ -1115,11 +1097,6 @@ namespace AzToolsFramework
         ToolsApplicationNotificationBus::Handler::BusDisconnect();
         EditorTransformComponentSelectionRequestBus::Handler::BusDisconnect();
         ActionManagerRegistrationNotificationBus::Handler::BusDisconnect();
-
-        if (!IsNewActionManagerEnabled())
-        {
-            EditorEventsBus::Handler::BusDisconnect();
-        }
     }
 
     void EditorTransformComponentSelection::SetupBoxSelect()
@@ -2244,309 +2221,13 @@ namespace AzToolsFramework
         }
     }
 
-    void EditorTransformComponentSelection::RegisterActions()
-    {
-        AZ_PROFILE_FUNCTION(AzToolsFramework);
-
-        const auto lockUnlock = [this](const bool lock)
-        {
-            AZ_PROFILE_FUNCTION(AzToolsFramework);
-
-            ScopedUndoBatch undoBatch(LockSelectionUndoRedoDesc);
-
-            if (m_entityIdManipulators.m_manipulators)
-            {
-                CreateEntityManipulatorDeselectCommand(undoBatch);
-            }
-
-            // make a copy of selected entity ids
-            const auto selectedEntityIds = EntityIdVectorFromContainer(m_selectedEntityIds);
-            for (AZ::EntityId entityId : selectedEntityIds)
-            {
-                ScopedUndoBatch::MarkEntityDirty(entityId);
-                SetEntityLockState(entityId, lock);
-            }
-
-            RegenerateManipulators();
-        };
-
-        // lock selection
-        AddAction(
-            m_actions, { QKeySequence(Qt::Key_L) }, LockSelection, LockSelectionTitle, LockSelectionDesc,
-            [lockUnlock]
-            {
-                lockUnlock(true);
-            });
-
-        // unlock selection
-        AddAction(
-            m_actions, { QKeySequence(Qt::CTRL + Qt::Key_L) }, UnlockSelection, LockSelectionTitle, LockSelectionDesc,
-            [lockUnlock]
-            {
-                lockUnlock(false);
-            });
-
-        const auto showHide = [this](const bool show)
-        {
-            AZ_PROFILE_FUNCTION(AzToolsFramework);
-
-            ScopedUndoBatch undoBatch(HideSelectionUndoRedoDesc);
-
-            if (m_entityIdManipulators.m_manipulators)
-            {
-                CreateEntityManipulatorDeselectCommand(undoBatch);
-            }
-
-            // make a copy of selected entity ids
-            const auto selectedEntityIds = EntityIdVectorFromContainer(m_selectedEntityIds);
-            for (AZ::EntityId entityId : selectedEntityIds)
-            {
-                ScopedUndoBatch::MarkEntityDirty(entityId);
-                SetEntityVisibility(entityId, show);
-            }
-
-            RegenerateManipulators();
-        };
-
-        // hide selection
-        AddAction(
-            m_actions, { QKeySequence(Qt::Key_H) }, HideSelection, HideSelectionTitle, HideSelectionDesc,
-            [showHide]
-            {
-                showHide(false);
-            });
-
-        // show selection
-        AddAction(
-            m_actions, { QKeySequence(Qt::CTRL + Qt::Key_H) }, ShowSelection, HideSelectionTitle, HideSelectionDesc,
-            [showHide]
-            {
-                showHide(true);
-            });
-
-        // unlock all entities in the level/scene
-        AddAction(
-            m_actions, { QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_L) }, UnlockAll, UnlockAllTitle, UnlockAllDesc,
-            []
-            {
-                AZ_PROFILE_FUNCTION(AzToolsFramework);
-
-                ScopedUndoBatch undoBatch(UnlockAllUndoRedoDesc);
-
-                EnumerateEditorEntities(
-                    [](AZ::EntityId entityId)
-                    {
-                        ScopedUndoBatch::MarkEntityDirty(entityId);
-                        SetEntityLockState(entityId, false);
-                    });
-            });
-
-        // show all entities in the level/scene
-        AddAction(
-            m_actions, { QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_H) }, ShowAll, ShowAllTitle, ShowAllDesc,
-            []
-            {
-                AZ_PROFILE_FUNCTION(AzToolsFramework);
-
-                ScopedUndoBatch undoBatch(ShowAllEntitiesUndoRedoDesc);
-
-                EnumerateEditorEntities(
-                    [](const AZ::EntityId entityId)
-                    {
-                        ScopedUndoBatch::MarkEntityDirty(entityId);
-                        SetEntityVisibility(entityId, true);
-                    });
-            });
-
-        // select all entities in the level/scene
-        AddAction(
-            m_actions, { QKeySequence(Qt::CTRL + Qt::Key_A) }, SelectAll, SelectAllTitle, SelectAllDesc,
-            [this]
-            {
-                AZ_PROFILE_FUNCTION(AzToolsFramework);
-
-                ScopedUndoBatch undoBatch(SelectAllEntitiesUndoRedoDesc);
-
-                if (m_entityIdManipulators.m_manipulators)
-                {
-                    auto manipulatorCommand =
-                        AZStd::make_unique<EntityManipulatorCommand>(CreateManipulatorCommandStateFromSelf(), ManipulatorUndoRedoName);
-
-                    // note, nothing will change that the manipulatorCommand needs to keep track
-                    // for after so no need to call SetManipulatorAfter
-
-                    manipulatorCommand->SetParent(undoBatch.GetUndoBatch());
-                    manipulatorCommand.release();
-                }
-
-                EnumerateEditorEntities(
-                    [this](AZ::EntityId entityId)
-                    {
-                        if (IsSelectableInViewport(entityId))
-                        {
-                            AddEntityToSelection(entityId);
-                        }
-                    });
-
-                auto nextEntityIds = EntityIdVectorFromContainer(m_selectedEntityIds);
-
-                auto selectionCommand = AZStd::make_unique<SelectionCommand>(nextEntityIds, SelectAllEntitiesUndoRedoDesc);
-                selectionCommand->SetParent(undoBatch.GetUndoBatch());
-                selectionCommand.release();
-
-                SetSelectedEntities(nextEntityIds);
-                RegenerateManipulators();
-            });
-
-        // invert current selection
-        AddAction(
-            m_actions, { QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_I) }, InvertSelect, InvertSelectionTitle, InvertSelectionDesc,
-            [this]
-            {
-                AZ_PROFILE_FUNCTION(AzToolsFramework);
-
-                ScopedUndoBatch undoBatch(InvertSelectionUndoRedoDesc);
-
-                if (m_entityIdManipulators.m_manipulators)
-                {
-                    auto manipulatorCommand =
-                        AZStd::make_unique<EntityManipulatorCommand>(CreateManipulatorCommandStateFromSelf(), ManipulatorUndoRedoName);
-
-                    // note, nothing will change that the manipulatorCommand needs to keep track
-                    // for after so no need to call SetManipulatorAfter
-
-                    manipulatorCommand->SetParent(undoBatch.GetUndoBatch());
-                    manipulatorCommand.release();
-                }
-
-                EntityIdSet entityIds;
-                EnumerateEditorEntities(
-                    [this, &entityIds](AZ::EntityId entityId)
-                    {
-                        const auto entityIdIt = AZStd::find(m_selectedEntityIds.begin(), m_selectedEntityIds.end(), entityId);
-                        if (entityIdIt == m_selectedEntityIds.end())
-                        {
-                            if (IsSelectableInViewport(entityId))
-                            {
-                                entityIds.insert(entityId);
-                            }
-                        }
-                    });
-
-                m_selectedEntityIds = entityIds;
-
-                auto nextEntityIds = EntityIdVectorFromContainer(entityIds);
-
-                auto selectionCommand = AZStd::make_unique<SelectionCommand>(nextEntityIds, InvertSelectionUndoRedoDesc);
-                selectionCommand->SetParent(undoBatch.GetUndoBatch());
-                selectionCommand.release();
-
-                SetSelectedEntities(nextEntityIds);
-                RegenerateManipulators();
-            });
-
-        // duplicate selection
-        AddAction(
-            m_actions, { QKeySequence(Qt::CTRL + Qt::Key_D) }, DuplicateSelect, DuplicateTitle, DuplicateDesc,
-            []
-            {
-                AZ_PROFILE_FUNCTION(AzToolsFramework);
-
-                ScopedUndoBatch undoBatch(DuplicateUndoRedoDesc);
-                auto selectionCommand = AZStd::make_unique<SelectionCommand>(EntityIdList(), DuplicateUndoRedoDesc);
-                selectionCommand->SetParent(undoBatch.GetUndoBatch());
-                selectionCommand.release();
-
-                bool handled = false;
-                EditorRequestBus::Broadcast(&EditorRequests::CloneSelection, handled);
-
-                // selection update handled in AfterEntitySelectionChanged
-            });
-
-        // delete selection
-        AddAction(
-            m_actions, { QKeySequence(Qt::Key_Delete) }, DeleteSelect, DeleteTitle, DeleteDesc,
-            [this]
-            {
-                AZ_PROFILE_FUNCTION(AzToolsFramework);
-
-                ScopedUndoBatch undoBatch(DeleteUndoRedoDesc);
-
-                CreateEntityManipulatorDeselectCommand(undoBatch);
-
-                ToolsApplicationRequestBus::Broadcast(
-                    &ToolsApplicationRequests::DeleteEntitiesAndAllDescendants, EntityIdVectorFromContainer(m_selectedEntityIds));
-
-                m_selectedEntityIds.clear();
-                m_pivotOverrideFrame.Reset();
-            });
-
-        AddAction(
-            m_actions, { QKeySequence(Qt::Key_Space) }, EditEscaspe, "", "",
-            [this]
-            {
-                DeselectEntities();
-            });
-
-        AddAction(
-            m_actions, { QKeySequence(Qt::Key_P) }, EditPivot, TogglePivotTitleEditMenu, TogglePivotDesc,
-            [this]
-            {
-                ToggleCenterPivotSelection();
-            });
-
-        AddAction(
-            m_actions, { QKeySequence(Qt::Key_R) }, EditReset, ResetEntityTransformTitle, ResetEntityTransformDesc,
-            [this]
-            {
-                switch (m_mode)
-                {
-                case Mode::Rotation:
-                    ResetOrientationForSelectedEntitiesLocal();
-                    break;
-                case Mode::Scale:
-                    CopyScaleToSelectedEntitiesIndividualLocal(1.0f);
-                    break;
-                case Mode::Translation:
-                    ResetTranslationForSelectedEntitiesLocal();
-                    break;
-                }
-            });
-
-        AddAction(
-            m_actions, { QKeySequence(Qt::CTRL + Qt::Key_R) }, EditResetManipulator, ResetManipulatorTitle, ResetManipulatorDesc,
-            [this]
-            {
-                DelegateClearManipulatorOverride();
-            });
-
-        AddAction(
-            m_actions, { QKeySequence(Qt::Key_U) }, ViewportUiVisible, "Toggle Viewport UI", "Hide/Show Viewport UI",
-            [this]
-            {
-                SetAllViewportUiVisible(!m_viewportUiVisible);
-            });
-
-        EditorMenuRequestBus::Broadcast(&EditorMenuRequests::RestoreEditMenuToDefault);
-    }
-
     void EditorTransformComponentSelection::OnActionUpdaterRegistrationHook()
     {
-        if (!IsNewActionManagerEnabled())
-        {
-            return;
-        }
-
         m_actionManagerInterface->RegisterActionUpdater(TransformModeChangedUpdaterIdentifier);
     }
 
     void EditorTransformComponentSelection::OnActionRegistrationHook()
     {
-        if (!IsNewActionManagerEnabled())
-        {
-            return;
-        }
-
         auto IsInEditorPickMode = []() -> bool
         {
             if (auto viewportEditorModeTracker = AZ::Interface<AzToolsFramework::ViewportEditorModeTrackerInterface>::Get())

+ 0 - 5
Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorTransformComponentSelection.h

@@ -145,7 +145,6 @@ namespace AzToolsFramework
         : public ViewportInteraction::ViewportSelectionRequests
         , public ActionManagerRegistrationNotificationBus::Handler
         , public EditorContextMenuBus::Handler
-        , private EditorEventsBus::Handler
         , private EditorTransformComponentSelectionRequestBus::Handler
         , private ToolsApplicationNotificationBus::Handler
         , private Camera::EditorCameraNotificationBus::Handler
@@ -219,10 +218,6 @@ namespace AzToolsFramework
 
         void SetupBoxSelect();
 
-        // Legacy ActionManager
-        void RegisterActions();
-        void UnregisterActions();
-
         // ActionManagerRegistrationNotificationBus overrides ...
         void OnActionUpdaterRegistrationHook() override;
         void OnActionRegistrationHook() override;

+ 4 - 32
Code/Framework/AzToolsFramework/Tests/EditorTransformComponentSelectionTests.cpp

@@ -312,14 +312,7 @@ namespace UnitTest
         ///////////////////////////////////////////////////////////////////////////////////////////////////////////////
         // When
         // R - reset entity and manipulator orientation when in Rotation Mode
-        if (AzToolsFramework::IsNewActionManagerEnabled())
-        {
-            QTest::keyPress(m_defaultMainWindow, Qt::Key_R);
-        }
-        else
-        {
-            QTest::keyPress(&m_editorActions.m_defaultWidget, Qt::Key_R);
-        }
+        QTest::keyPress(m_defaultMainWindow, Qt::Key_R);
         ///////////////////////////////////////////////////////////////////////////////////////////////////////////////
 
         ///////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -368,14 +361,7 @@ namespace UnitTest
         ///////////////////////////////////////////////////////////////////////////////////////////////////////////////
         // When
         // Ctrl+R - reset only manipulator orientation when in Rotation Mode
-        if (AzToolsFramework::IsNewActionManagerEnabled())
-        {
-            QTest::keyPress(m_defaultMainWindow, Qt::Key_R, Qt::ControlModifier);
-        }
-        else
-        {
-            QTest::keyPress(&m_editorActions.m_defaultWidget, Qt::Key_R, Qt::ControlModifier);
-        }
+        QTest::keyPress(m_defaultMainWindow, Qt::Key_R, Qt::ControlModifier);
         ///////////////////////////////////////////////////////////////////////////////////////////////////////////////
 
         ///////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -501,14 +487,7 @@ namespace UnitTest
         ///////////////////////////////////////////////////////////////////////////////////////////////////////////////
         // When
         // 'Invert Selection' shortcut
-        if (AzToolsFramework::IsNewActionManagerEnabled())
-        {
-            QTest::keyPress(m_defaultMainWindow, Qt::Key_I, Qt::ControlModifier | Qt::ShiftModifier);
-        }
-        else
-        {
-            QTest::keyPress(&m_editorActions.m_defaultWidget, Qt::Key_I, Qt::ControlModifier | Qt::ShiftModifier);
-        }
+        QTest::keyPress(m_defaultMainWindow, Qt::Key_I, Qt::ControlModifier | Qt::ShiftModifier);
         ///////////////////////////////////////////////////////////////////////////////////////////////////////////////
 
         ///////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -538,14 +517,7 @@ namespace UnitTest
         ///////////////////////////////////////////////////////////////////////////////////////////////////////////////
         // When
         // 'Select All' shortcut
-        if (AzToolsFramework::IsNewActionManagerEnabled())
-        {
-            QTest::keyPress(m_defaultMainWindow, Qt::Key_A, Qt::ControlModifier);
-        }
-        else
-        {
-            QTest::keyPress(&m_editorActions.m_defaultWidget, Qt::Key_A, Qt::ControlModifier);
-        }
+        QTest::keyPress(m_defaultMainWindow, Qt::Key_A, Qt::ControlModifier);
         ///////////////////////////////////////////////////////////////////////////////////////////////////////////////
 
         ///////////////////////////////////////////////////////////////////////////////////////////////////////////////

+ 7 - 10
Gems/AWSCore/Code/Source/AWSCoreEditorSystemComponent.cpp

@@ -73,19 +73,16 @@ namespace AWSCore
 
     void AWSCoreEditorSystemComponent::Activate()
     {
-        if (AzToolsFramework::IsNewActionManagerEnabled())
-        {
-            AzToolsFramework::ActionManagerRegistrationNotificationBus::Handler::BusConnect();
+        AzToolsFramework::ActionManagerRegistrationNotificationBus::Handler::BusConnect();
 
-            m_actionManagerInterface = AZ::Interface<AzToolsFramework::ActionManagerInterface>::Get();
-            AZ_Assert(m_actionManagerInterface, "AWSCoreEditorSystemComponent - could not get ActionManagerInterface");
+        m_actionManagerInterface = AZ::Interface<AzToolsFramework::ActionManagerInterface>::Get();
+        AZ_Assert(m_actionManagerInterface, "AWSCoreEditorSystemComponent - could not get ActionManagerInterface");
 
-            m_menuManagerInterface = AZ::Interface<AzToolsFramework::MenuManagerInterface>::Get();
-            AZ_Assert(m_menuManagerInterface, "AWSCoreEditorSystemComponent - could not get MenuManagerInterface");
+        m_menuManagerInterface = AZ::Interface<AzToolsFramework::MenuManagerInterface>::Get();
+        AZ_Assert(m_menuManagerInterface, "AWSCoreEditorSystemComponent - could not get MenuManagerInterface");
 
-            m_menuManagerInternalInterface = AZ::Interface<AzToolsFramework::MenuManagerInternalInterface>::Get();
-            AZ_Assert(m_menuManagerInterface, "AWSCoreEditorSystemComponent - could not get MenuManagerInternalInterface");
-        }
+        m_menuManagerInternalInterface = AZ::Interface<AzToolsFramework::MenuManagerInternalInterface>::Get();
+        AZ_Assert(m_menuManagerInterface, "AWSCoreEditorSystemComponent - could not get MenuManagerInternalInterface");
 
         AWSCoreEditorRequestBus::Handler::BusConnect();
     }

+ 4 - 7
Gems/LandscapeCanvas/Code/Source/Editor/MainWindow.cpp

@@ -528,14 +528,11 @@ namespace LandscapeCanvasEditor
 
         UpdateGraphEnabled();
 
-        if (AzToolsFramework::IsNewActionManagerEnabled())
-        {
-            static constexpr AZStd::string_view LandscapeCanvasActionContextIdentifier = "o3de.context.editor.landscapecanvas";
+        static constexpr AZStd::string_view LandscapeCanvasActionContextIdentifier = "o3de.context.editor.landscapecanvas";
 
-            if(auto hotKeyManagerInterface = AZ::Interface<AzToolsFramework::HotKeyManagerInterface>::Get())
-            {
-                hotKeyManagerInterface->AssignWidgetToActionContext(LandscapeCanvasActionContextIdentifier, this);
-            }
+        if(auto hotKeyManagerInterface = AZ::Interface<AzToolsFramework::HotKeyManagerInterface>::Get())
+        {
+            hotKeyManagerInterface->AssignWidgetToActionContext(LandscapeCanvasActionContextIdentifier, this);
         }
     }
 

+ 6 - 13
Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/GraphVariablesTableView.cpp

@@ -1155,27 +1155,20 @@ namespace ScriptCanvasEditor
         setMinimumSize(0, 0);
         ResizeColumns();
 
-        if (AzToolsFramework::IsNewActionManagerEnabled())
+        if (auto hotKeyManagerInterface = AZ::Interface<AzToolsFramework::HotKeyManagerInterface>::Get())
         {
-            if (auto hotKeyManagerInterface = AZ::Interface<AzToolsFramework::HotKeyManagerInterface>::Get())
-            {
-                hotKeyManagerInterface->AssignWidgetToActionContext(
-                    ScriptCanvasIdentifiers::ScriptCanvasVariablesActionContextIdentifier, this);
-            }
+            hotKeyManagerInterface->AssignWidgetToActionContext(
+                ScriptCanvasIdentifiers::ScriptCanvasVariablesActionContextIdentifier, this);
         }
     }
 
     GraphVariablesTableView::~GraphVariablesTableView()
     {
-        if (AzToolsFramework::IsNewActionManagerEnabled())
+        if (auto hotKeyManagerInterface = AZ::Interface<AzToolsFramework::HotKeyManagerInterface>::Get())
         {
-            if (auto hotKeyManagerInterface = AZ::Interface<AzToolsFramework::HotKeyManagerInterface>::Get())
-            {
-                hotKeyManagerInterface->RemoveWidgetFromActionContext(
-                    ScriptCanvasIdentifiers::ScriptCanvasVariablesActionContextIdentifier, this);
-            }
+            hotKeyManagerInterface->RemoveWidgetFromActionContext(
+                ScriptCanvasIdentifiers::ScriptCanvasVariablesActionContextIdentifier, this);
         }
-
     }
 
     void GraphVariablesTableView::SetActiveScene(const ScriptCanvas::ScriptCanvasId& scriptCanvasId)

+ 5 - 11
Gems/ScriptCanvas/Code/Editor/View/Windows/MainWindow.cpp

@@ -441,14 +441,11 @@ namespace ScriptCanvasEditor
 
         m_editorToolbar = aznew GraphCanvas::AssetEditorToolbar(ScriptCanvasEditor::AssetEditorId);
 
-        if (AzToolsFramework::IsNewActionManagerEnabled())
+        if(auto hotKeyManagerInterface = AZ::Interface<AzToolsFramework::HotKeyManagerInterface>::Get())
         {
-            if(auto hotKeyManagerInterface = AZ::Interface<AzToolsFramework::HotKeyManagerInterface>::Get())
-            {
-                hotKeyManagerInterface->AssignWidgetToActionContext(ScriptCanvasIdentifiers::ScriptCanvasActionContextIdentifier, this);
-            }
+            hotKeyManagerInterface->AssignWidgetToActionContext(ScriptCanvasIdentifiers::ScriptCanvasActionContextIdentifier, this);
         }
-
+        
         // Custom Actions
         {
             m_assignToSelectedEntity = new QToolButton();
@@ -684,12 +681,9 @@ namespace ScriptCanvasEditor
         ScriptCanvas::ScriptCanvasSettingsRequestBus::Handler::BusDisconnect();
         AzToolsFramework::AssetSystemBus::Handler::BusDisconnect();
 
-        if (AzToolsFramework::IsNewActionManagerEnabled())
+        if (auto hotKeyManagerInterface = AZ::Interface<AzToolsFramework::HotKeyManagerInterface>::Get())
         {
-            if (auto hotKeyManagerInterface = AZ::Interface<AzToolsFramework::HotKeyManagerInterface>::Get())
-            {
-                hotKeyManagerInterface->RemoveWidgetFromActionContext(ScriptCanvasIdentifiers::ScriptCanvasActionContextIdentifier, this);
-            }
+            hotKeyManagerInterface->RemoveWidgetFromActionContext(ScriptCanvasIdentifiers::ScriptCanvasActionContextIdentifier, this);
         }
 
         Clear();