mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-06 14:00:39 +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;
|
||||
S32 type= mField->type;
|
||||
ConsoleValue evaluationResult;
|
||||
if( type == TypeS8 || type == TypeS32 || type == TypeF32 )
|
||||
{
|
||||
char buffer[ 2048 ];
|
||||
expandEscape( buffer, newValue );
|
||||
ConsoleValue result = Con::evaluatef("$f = \"%s\"; return ( %s );", oldValue.c_str(), buffer);
|
||||
newValue = result.getString();
|
||||
evaluationResult = Con::evaluatef("$f = \"%s\"; return ( %s );", oldValue.c_str(), buffer);
|
||||
newValue = evaluationResult.getString();
|
||||
Con::evaluatef("$f=0;");
|
||||
}
|
||||
else if( type == TypeS32Vector
|
||||
|
|
@ -355,13 +356,13 @@ void GuiInspectorField::setData( const char* data, bool callbacks )
|
|||
char buffer[ 2048 ];
|
||||
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);
|
||||
Con::evaluatef("$f=0;$v=0;");
|
||||
|
||||
if( !isFirst )
|
||||
strNew.append( ' ' );
|
||||
strNew.append( result.getString() );
|
||||
strNew.append( evaluationResult.getString() );
|
||||
|
||||
isFirst = false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue