set the expression directly

This commit is contained in:
Glenn Maynard
2006-09-22 03:32:18 +00:00
parent 1b8b029eef
commit 494053c420
+4 -2
View File
@@ -331,11 +331,13 @@ public:
THEME->GetMetric( m_sGroup, m_sName, sExpression );
Lua *L = LUA->Get();
LuaHelpers::RunScript( L, "return " + sExpression, ssprintf("%s:%s", m_sGroup.c_str(), m_sName.c_str()), 1 );
m_Value.SetName( ssprintf("%s:%s", m_sGroup.c_str(), m_sName.c_str()) );
m_Value.SetFromExpression( sExpression );
m_Value.PushSelf( L );
if( lua_type(L, -1) == LUA_TFUNCTION )
{
m_Value.SetFromStack( L );
lua_pop( L, 1 );
}
else
{