diff --git a/src/items/xqitemfactory.cpp b/src/items/xqitemfactory.cpp
index a11b191..afdc0ec 100644
--- a/src/items/xqitemfactory.cpp
+++ b/src/items/xqitemfactory.cpp
@@ -70,22 +70,30 @@ bool XQItemFactory::isValid()
//! es reicht nicht, einen itemType aus den itemType-templates zu
//! holen: möglicherweise muss der noch mit zusätzlichen attributen
-//! ergänzt werden, (hier 'UnitType' ). Al
-//!
-//! \param sheetEntry
-//! \return
-//!
+//! ergänzt werden, (hier 'UnitType' ).
XQItemType* XQItemFactory::makeItemType(const XQNodePtr& sheetEntry )
{
QString typeKey = sheetEntry->attribute("ItemType");
+
XQItemType* itemType = findItemTypeTemplate(typeKey);
// wir prüfen, ob im sheetEntry noch zusätzliche attribute vorhanden
// sind, die wir in dem itemType müssen
+ // über alle attribute
+ for (const auto& attr : sheetEntry->attributes())
+ {
+ // prüfen, ob der itemType des attribute schon hat
+ int role = itemType->hasAttribute( attr.first);
+ // wenn ja, überschreiben
+ if( role != XQItem::NoRole )
+ {
+ QVariant newValue = makeVariant(role,attr.second);
+ itemType = itemType->replaceAttribute( newValue, role );
+ }
-
+ }
return itemType;
}
diff --git a/xml/modelsheets.xml b/xml/modelsheets.xml
index 6ecea64..91076e0 100644
--- a/xml/modelsheets.xml
+++ b/xml/modelsheets.xml
@@ -11,7 +11,7 @@
-
+