- property_text()=(Glib::ustring)strprintf("(%i)",data.get(int()));
- std::list<synfig::ParamDesc::EnumData> enum_list=((synfig::ParamDesc)property_param_desc_).get_enum_list();
- std::list<synfig::ParamDesc::EnumData>::iterator iter;
-
- for(iter=enum_list.begin();iter!=enum_list.end();iter++)
- if(iter->value==data.get(int()))
- {
- // don't show the key_board s_hortcut under_scores
- String local_name = iter->local_name;
- String::size_type pos = local_name.find_first_of('_');
- if (pos != String::npos)
- property_text() = local_name.substr(0,pos) + local_name.substr(pos+1);
- else
- property_text() = local_name;
- break;
- }
+ String param_hint, child_param_hint;
+ param_hint=get_param_desc().get_hint();
+ child_param_hint=get_child_param_desc().get_hint();
+ if(param_hint!="enum" && child_param_hint!="enum")
+ {
+ property_text()=(Glib::ustring)strprintf("%i",data.get(int()));
+ }
+ else
+ {
+ property_text()=(Glib::ustring)strprintf("(%i)",data.get(int()));
+ std::list<synfig::ParamDesc::EnumData> enum_list;
+ if(param_hint=="enum")
+ enum_list=((synfig::ParamDesc)property_param_desc_).get_enum_list();
+ else if(child_param_hint=="enum")
+ enum_list=((synfig::ParamDesc)property_child_param_desc_).get_enum_list();
+ std::list<synfig::ParamDesc::EnumData>::iterator iter;
+ for(iter=enum_list.begin();iter!=enum_list.end();iter++)
+ if(iter->value==data.get(int()))
+ {
+ // don't show the key_board s_hortcut under_scores
+ String local_name = iter->local_name;
+ String::size_type pos = local_name.find_first_of('_');
+ if (pos != String::npos)
+ property_text() = local_name.substr(0,pos) + local_name.substr(pos+1);
+ else
+ property_text() = local_name;
+ break;
+ }
+ }