From 33f5f6269a704c9365eacb35470a202214365d5d Mon Sep 17 00:00:00 2001 From: Mike Ho Date: Thu, 30 Jun 2011 10:08:13 -0700 Subject: [PATCH] Updated metacontrol template to use new AddItems() method for Type-based listboxes --- .../templates/db_orm/meta_control/control_create_type.tpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/qcodo/_core/codegen/templates/db_orm/meta_control/control_create_type.tpl b/includes/qcodo/_core/codegen/templates/db_orm/meta_control/control_create_type.tpl index fe2e4d10..8f893d5d 100644 --- a/includes/qcodo/_core/codegen/templates/db_orm/meta_control/control_create_type.tpl +++ b/includes/qcodo/_core/codegen/templates/db_orm/meta_control/control_create_type.tpl @@ -11,8 +11,8 @@ <% } %><% if (!$objColumn->NotNull) { %> $this-><%=$strControlId %>->AddItem(QApplication::Translate('- Select One -'), null); <% } %> - foreach (<%= $objColumn->Reference->VariableType %>::$NameArray as $intId => $strValue) - $this-><%= $strControlId %>->AddItem(new QListItem($strValue, $intId, $this-><%= $strObjectName %>-><%= $objColumn->PropertyName %> == $intId)); + + $this-><%= $strControlId %>->AddItems(<%= $objColumn->Reference->VariableType %>::$NameArray, $this-><%= $strObjectName %>-><%= $objColumn->PropertyName %>); return $this-><%= $strControlId %>; }