From 0f59718ff07f548b2a53e962766eb778589cec9b Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Mon, 3 Jan 2022 14:59:09 -0800 Subject: [PATCH] Removes CommentConstructMenuActions.cpp/h from Gems/GraphCanvas Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- .../CommentConstructMenuActions.cpp | 55 ------------------- .../CommentConstructMenuActions.h | 26 --------- .../GraphCanvasConstructActionsMenuGroup.cpp | 1 - .../Code/graphcanvas_staticlib_files.cmake | 2 - 4 files changed, 84 deletions(-) delete mode 100644 Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/ConstructMenuActions/CommentConstructMenuActions.cpp delete mode 100644 Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/ConstructMenuActions/CommentConstructMenuActions.h diff --git a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/ConstructMenuActions/CommentConstructMenuActions.cpp b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/ConstructMenuActions/CommentConstructMenuActions.cpp deleted file mode 100644 index d07ec91a3f..0000000000 --- a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/ConstructMenuActions/CommentConstructMenuActions.cpp +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#include - -#include -#include -#include -#include - -#include - - -namespace GraphCanvas -{ - ///////////////////////// - // AddCommentMenuAction - ///////////////////////// - - AddCommentMenuAction::AddCommentMenuAction(QObject* parent) - : ConstructContextMenuAction("Add comment", parent) - { - } - - ContextMenuAction::SceneReaction AddCommentMenuAction::TriggerAction(const AZ::Vector2& scenePos) - { - const GraphId& graphId = GetGraphId(); - - SceneRequestBus::Event(graphId, &SceneRequests::ClearSelection); - - AZ::Entity* graphCanvasEntity = nullptr; - GraphCanvasRequestBus::BroadcastResult(graphCanvasEntity, &GraphCanvasRequests::CreateCommentNodeAndActivate); - - AZ_Assert(graphCanvasEntity, "Unable to create GraphCanvas Bus Node"); - - if (graphCanvasEntity) - { - SceneRequestBus::Event(graphId, &SceneRequests::AddNode, graphCanvasEntity->GetId(), scenePos, false); - CommentUIRequestBus::Event(graphCanvasEntity->GetId(), &CommentUIRequests::SetEditable, true); - } - - if (graphCanvasEntity != nullptr) - { - return SceneReaction::PostUndo; - } - else - { - return SceneReaction::Nothing; - } - } -} diff --git a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/ConstructMenuActions/CommentConstructMenuActions.h b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/ConstructMenuActions/CommentConstructMenuActions.h deleted file mode 100644 index 3c9c767619..0000000000 --- a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/ConstructMenuActions/CommentConstructMenuActions.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ -#pragma once - -#include - -namespace GraphCanvas -{ - class AddCommentMenuAction - : public ConstructContextMenuAction - { - public: - AZ_CLASS_ALLOCATOR(AddCommentMenuAction, AZ::SystemAllocator, 0); - - AddCommentMenuAction(QObject* parent); - virtual ~AddCommentMenuAction() = default; - - using ConstructContextMenuAction::TriggerAction; - SceneReaction TriggerAction(const AZ::Vector2& scenePos) override; - }; -} diff --git a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/ConstructMenuActions/GraphCanvasConstructActionsMenuGroup.cpp b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/ConstructMenuActions/GraphCanvasConstructActionsMenuGroup.cpp index d075594ab0..e5a7cf8073 100644 --- a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/ConstructMenuActions/GraphCanvasConstructActionsMenuGroup.cpp +++ b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/ConstructMenuActions/GraphCanvasConstructActionsMenuGroup.cpp @@ -10,7 +10,6 @@ #include #include -#include #include #include diff --git a/Gems/GraphCanvas/Code/graphcanvas_staticlib_files.cmake b/Gems/GraphCanvas/Code/graphcanvas_staticlib_files.cmake index 9572219a13..eeba6ff4fb 100644 --- a/Gems/GraphCanvas/Code/graphcanvas_staticlib_files.cmake +++ b/Gems/GraphCanvas/Code/graphcanvas_staticlib_files.cmake @@ -144,8 +144,6 @@ set(FILES StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/AlignmentMenuActions/AlignmentContextMenuActions.h StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/ConstructMenuActions/BookmarkConstructMenuActions.cpp StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/ConstructMenuActions/BookmarkConstructMenuActions.h - StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/ConstructMenuActions/CommentConstructMenuActions.cpp - StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/ConstructMenuActions/CommentConstructMenuActions.h StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/ConstructMenuActions/ConstructContextMenuAction.h StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/ConstructMenuActions/ConstructPresetMenuActions.cpp StaticLib/GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/ConstructMenuActions/ConstructPresetMenuActions.h