From 94921caf9ca327d35adcb941f51ba4b1a776f768 Mon Sep 17 00:00:00 2001 From: Comment Date: Wed, 6 Nov 2013 01:09:39 +0000 Subject: json loader issue --- rotord/src/rotor.h | 1 + 1 file changed, 1 insertion(+) (limited to 'rotord/src/rotor.h') 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 _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 _vals={},std::string _type="string") { -- cgit v1.2.3