Cleaned up configset targeting in the list setting API

This commit is contained in:
Jason Perkins 2013-10-09 17:34:21 -04:00
parent 5855e6f596
commit 760261cf3d

7
src/base/api.lua Normal file → Executable file
View File

@ -549,9 +549,10 @@
function api.setlist(target, name, field, value)
local setter = api.getsetter(field)
-- am I setting a configurable object, or some kind of subfield?
local result
if name == field.name then
-- If this target is just a wrapper for a configuration set,
-- apply the new values to that set instead. The current
-- solution and project objects act this way.
if target.configset then
target = target.configset
end