Removes CommentConstructMenuActions.cpp/h from Gems/GraphCanvas

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
Esteban Papp
2022-01-03 14:59:09 -08:00
parent 504009a63b
commit 0f59718ff0
4 changed files with 0 additions and 84 deletions
@@ -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 <GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/ConstructMenuActions/CommentConstructMenuActions.h>
#include <GraphCanvas/Components/Nodes/Comment/CommentBus.h>
#include <GraphCanvas/Components/SceneBus.h>
#include <GraphCanvas/Editor/AssetEditorBus.h>
#include <GraphCanvas/GraphCanvasBus.h>
#include <GraphCanvas/Utils/ConversionUtils.h>
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;
}
}
}
@@ -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 <GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/ConstructMenuActions/ConstructContextMenuAction.h>
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;
};
}
@@ -10,7 +10,6 @@
#include <GraphCanvas/Editor/AssetEditorBus.h>
#include <GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/ConstructMenuActions/BookmarkConstructMenuActions.h>
#include <GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/ConstructMenuActions/CommentConstructMenuActions.h>
#include <GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/ConstructMenuActions/ConstructContextMenuAction.h>
#include <GraphCanvas/Widgets/EditorContextMenu/ContextMenuActions/ConstructMenuActions/ConstructPresetMenuActions.h>
@@ -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