clean up comments, add set type action in disabled form

Signed-off-by: carlitosan <82187351+carlitosan@users.noreply.github.com>
This commit is contained in:
carlitosan
2022-01-14 12:46:08 -08:00
parent 02ce4659c4
commit 295c836ed8
6 changed files with 9 additions and 11 deletions
@@ -667,7 +667,6 @@ namespace ScriptCanvasEditor
}
// Now that the slot has a valid type/name, we can actually promote it to a variable
// #sc_user_slot_variable_ux add a value indicating that the slot is new
if (PromoteToVariableAction(endpoint, true))
{
ScriptCanvas::GraphVariable* variable = slot->GetVariable();
@@ -2191,7 +2190,6 @@ namespace ScriptCanvasEditor
bool Graph::PromoteToVariableAction(const GraphCanvas::Endpoint& endpoint, bool isNewSlot)
{
// #sc_user_slot_variable_ux make the fix here...rework is user added or something
ScriptCanvas::Endpoint scriptCanvasEndpoint = ConvertToScriptCanvasEndpoint(endpoint);
auto activeNode = FindNode(scriptCanvasEndpoint.GetNodeId());
@@ -2283,7 +2281,6 @@ namespace ScriptCanvasEditor
AZ::Outcome<ScriptCanvas::VariableId, AZStd::string> addOutcome;
// #sc_user_slot_variable_ux re-use the activeDatum, send the pointer (actually, all of the source slot information, and make a special conversion)
ScriptCanvas::GraphVariableManagerRequestBus::EventResult(addOutcome, GetScriptCanvasId(), &ScriptCanvas::GraphVariableManagerRequests::AddVariable, variableName, variableDatum, true);
if (addOutcome.IsSuccess())
@@ -3874,8 +3874,12 @@ namespace ScriptCanvasEditor
contextMenu.AddMenuAction(aznew ExposeSlotMenuAction(&contextMenu));
contextMenu.AddMenuAction(aznew CreateAzEventHandlerSlotMenuAction(&contextMenu));
// disabling until references can be changed
// contextMenu.AddMenuAction(aznew SetDataSlotTypeMenuAction(&contextMenu));
auto setSlotTypeAction = aznew SetDataSlotTypeMenuAction(&contextMenu);
// Changing slot type is disabled temporarily because now that that user data slots are correctly coordinated with their reference
// variables, their type cannot be changed. The next change will allow all variables to change their type post creation, and then
// that will allow this action to be enabled.
setSlotTypeAction->setEnabled(false);
contextMenu.AddMenuAction(setSlotTypeAction);
return HandleContextMenu(contextMenu, slotId, screenPoint, scenePoint);
}