mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 16:44:36 +00:00
* BugFix: Correct a scoping error with ConsoleValue in the updated code in GuiInspectorField.
This commit is contained in:
parent
4dea3810b9
commit
41e5988c46
1 changed files with 5 additions and 4 deletions
|
|
@ -314,12 +314,13 @@ void GuiInspectorField::setData( const char* data, bool callbacks )
|
||||||
|
|
||||||
String newValue = strData;
|
String newValue = strData;
|
||||||
S32 type= mField->type;
|
S32 type= mField->type;
|
||||||
|
ConsoleValue evaluationResult;
|
||||||
if( type == TypeS8 || type == TypeS32 || type == TypeF32 )
|
if( type == TypeS8 || type == TypeS32 || type == TypeF32 )
|
||||||
{
|
{
|
||||||
char buffer[ 2048 ];
|
char buffer[ 2048 ];
|
||||||
expandEscape( buffer, newValue );
|
expandEscape( buffer, newValue );
|
||||||
ConsoleValue result = Con::evaluatef("$f = \"%s\"; return ( %s );", oldValue.c_str(), buffer);
|
evaluationResult = Con::evaluatef("$f = \"%s\"; return ( %s );", oldValue.c_str(), buffer);
|
||||||
newValue = result.getString();
|
newValue = evaluationResult.getString();
|
||||||
Con::evaluatef("$f=0;");
|
Con::evaluatef("$f=0;");
|
||||||
}
|
}
|
||||||
else if( type == TypeS32Vector
|
else if( type == TypeS32Vector
|
||||||
|
|
@ -355,13 +356,13 @@ void GuiInspectorField::setData( const char* data, bool callbacks )
|
||||||
char buffer[ 2048 ];
|
char buffer[ 2048 ];
|
||||||
expandEscape( buffer, newComponentExpr );
|
expandEscape( buffer, newComponentExpr );
|
||||||
|
|
||||||
ConsoleValue result = Con::evaluatef("$f = \"%s\"; $v = \"%s\"; return ( %s );",
|
evaluationResult = Con::evaluatef("$f = \"%s\"; $v = \"%s\"; return ( %s );",
|
||||||
oldComponentVal, oldValue.c_str(), buffer);
|
oldComponentVal, oldValue.c_str(), buffer);
|
||||||
Con::evaluatef("$f=0;$v=0;");
|
Con::evaluatef("$f=0;$v=0;");
|
||||||
|
|
||||||
if( !isFirst )
|
if( !isFirst )
|
||||||
strNew.append( ' ' );
|
strNew.append( ' ' );
|
||||||
strNew.append( result.getString() );
|
strNew.append( evaluationResult.getString() );
|
||||||
|
|
||||||
isFirst = false;
|
isFirst = false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue