Disambiguate setters and getters with the same name + updates to fix duplicates

Signed-off-by: lsemp3d <58790905+lsemp3d@users.noreply.github.com>
This commit is contained in:
lsemp3d
2021-11-30 17:37:56 -08:00
parent 3ee528042f
commit 8ebfe4004e
7 changed files with 625 additions and 721 deletions
@@ -328,6 +328,7 @@ namespace ScriptCanvasEditor::Nodes
// Set the class' name as the subtitle fallback
details.m_subtitle = details.m_name;
AZStd::string methodContext;
// Get the method's text data
GraphCanvas::TranslationRequests::Details methodDetails;
methodDetails.m_name = details.m_name; // fallback
@@ -338,14 +339,16 @@ namespace ScriptCanvasEditor::Nodes
if (methodNode->GetMethodType() == ScriptCanvas::MethodType::Getter || methodNode->GetMethodType() == ScriptCanvas::MethodType::Free)
{
updatedMethodName = "Get";
methodContext = "Getter";
}
else
{
updatedMethodName = "Set";
methodContext = "Setter";
}
updatedMethodName.append(methodName);
}
key << updatedMethodName;
key << methodContext << updatedMethodName;
GraphCanvas::TranslationRequestBus::BroadcastResult(methodDetails, &GraphCanvas::TranslationRequests::GetDetails, key + ".details", methodDetails);