summaryrefslogtreecommitdiff
path: root/rotord/src/rotor.h
diff options
context:
space:
mode:
authorComment <tim@gray.(none)>2013-11-06 01:09:39 +0000
committerComment <tim@gray.(none)>2013-11-06 01:09:39 +0000
commit94921caf9ca327d35adcb941f51ba4b1a776f768 (patch)
tree5c7cf44fe1ccde53b380ee2346ce3535943ca016 /rotord/src/rotor.h
parent18a77356a424511e7ae1865d1554d20b4b5c51fb (diff)
json loader issue
Diffstat (limited to 'rotord/src/rotor.h')
-rw-r--r--rotord/src/rotor.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/rotord/src/rotor.h b/rotord/src/rotor.h
index aa76491..a8e6fca 100644
--- a/rotord/src/rotor.h
+++ b/rotord/src/rotor.h
@@ -249,6 +249,7 @@ namespace Rotor {
parameters[_name]=new Parameter(_type,_desc,_title,_value,_min,_max,_step,_connect);
};
void create_attribute(const string &_attr,const string &_desc,const string &_title,const string &_value,std::vector<std::string> _vals={},std::string _type="string") {
+ if (_vals.size()&&_type!="array") _type="enum"; //hack for incomplete attribute types
attributes[_attr]=new Attribute(_desc,_title,_value,_vals,_type);
};
void create_attribute(string *alias,const string &_attr,const string &_desc,const string &_title,const string &_value,std::vector<std::string> _vals={},std::string _type="string") {