Skip to content
This repository
Browse code

Updated metacontrol template to use new AddItems() method for Type-ba…

…sed listboxes
  • Loading branch information...
commit 33f5f6269a704c9365eacb35470a202214365d5d 1 parent 67c924d
Mike Ho mikeho authored
4 includes/qcodo/_core/codegen/templates/db_orm/meta_control/control_create_type.tpl
@@ -11,8 +11,8 @@
11 11 <% } %><% if (!$objColumn->NotNull) { %>
12 12 $this-><%=$strControlId %>->AddItem(QApplication::Translate('- Select One -'), null);
13 13 <% } %>
14   - foreach (<%= $objColumn->Reference->VariableType %>::$NameArray as $intId => $strValue)
15   - $this-><%= $strControlId %>->AddItem(new QListItem($strValue, $intId, $this-><%= $strObjectName %>-><%= $objColumn->PropertyName %> == $intId));
  14 +
  15 + $this-><%= $strControlId %>->AddItems(<%= $objColumn->Reference->VariableType %>::$NameArray, $this-><%= $strObjectName %>-><%= $objColumn->PropertyName %>);
16 16 return $this-><%= $strControlId %>;
17 17 }
18 18

0 comments on commit 33f5f62

Please sign in to comment.
Something went wrong with that request. Please try again.