Script Canvas node translation system and naming consistency
Signed-off-by: lsemp3d <58790905+lsemp3d@users.noreply.github.com>
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
#include <GraphCanvas/Editor/GraphCanvasProfiler.h>
|
||||
#include <GraphCanvas/tools.h>
|
||||
#include <GraphCanvas/Styling/StyleHelper.h>
|
||||
#include <Translation/TranslationBus.h>
|
||||
|
||||
namespace GraphCanvas
|
||||
{
|
||||
@@ -76,19 +77,11 @@ namespace GraphCanvas
|
||||
m_hasBorderOverride = false;
|
||||
}
|
||||
|
||||
void GraphCanvasLabel::SetLabel(const AZStd::string& label, const AZStd::string& translationContext, const AZStd::string& translationKey)
|
||||
void GraphCanvasLabel::SetLabel(const AZStd::string& value)
|
||||
{
|
||||
TranslationKeyedString keyedString(label, translationContext, translationKey);
|
||||
SetLabel(keyedString);
|
||||
}
|
||||
|
||||
void GraphCanvasLabel::SetLabel(const TranslationKeyedString& value)
|
||||
{
|
||||
AZStd::string displayString = value.GetDisplayString();
|
||||
|
||||
if (m_labelText.compare(QString(displayString.c_str())))
|
||||
if (m_labelText.compare(QString(value.c_str())))
|
||||
{
|
||||
m_labelText = Tools::qStringFromUtf8(displayString);
|
||||
m_labelText = Tools::qStringFromUtf8(value);
|
||||
|
||||
UpdateDisplayText();
|
||||
RefreshDisplay();
|
||||
|
||||
Reference in New Issue
Block a user