UI: fix display of shape key list to show with no items,

list template should also accept None.
This commit is contained in:
Brecht Van Lommel 2009-09-17 14:35:08 +00:00
parent a911fd88af
commit 7783c286b9
2 changed files with 5 additions and 3 deletions

@ -102,8 +102,7 @@ class DATA_PT_shape_keys(DataButtonsPanel):
kb = ob.active_shape_key
row = layout.row()
if key: # XXX - looks crappy
row.template_list(key, "keys", ob, "active_shape_key_index", rows=2)
row.template_list(key, "keys", ob, "active_shape_key_index", rows=2)
col = row.column()

@ -301,7 +301,10 @@ void RNA_api_ui_layout(StructRNA *srna)
func= RNA_def_function(srna, "template_list", "uiTemplateList");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
api_ui_item_rna_common(func);
parm= RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property.");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR);
parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in data.");
RNA_def_property_flag(parm, PROP_REQUIRED);
parm= RNA_def_pointer(func, "active_data", "AnyType", "", "Data from which to take property for the active element.");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL);
parm= RNA_def_string(func, "active_property", "", 0, "", "Identifier of property in data, for the active element.");