QmlDesigner.ItemLibrary: fixed: do not display non-visual components

Task-number: BAUHAUS-433
Reviewed-by: kkoehne
This commit is contained in:
Jörg Schummer
2010-03-04 13:30:36 +02:00
committed by Kai Koehne
parent b3a6fe134a
commit 0943177d86

View File

@@ -435,8 +435,11 @@ void ItemLibraryModel::updateVisibility()
QList<ItemLibraryInfo> ItemLibraryModel::itemLibraryRepresentations(const QString &type)
{
QList<ItemLibraryInfo> itemLibraryRepresentationList;
NodeMetaInfo nodeInfo = m_metaInfo->nodeMetaInfo(type);
QList<ItemLibraryInfo> itemLibraryRepresentationList = m_metaInfo->itemLibraryRepresentations(nodeInfo);
if (nodeInfo.isQmlGraphicsItem()) {
itemLibraryRepresentationList = m_metaInfo->itemLibraryRepresentations(nodeInfo);
QImage dragImage(64, 64, QImage::Format_RGB32); // TODO: draw item drag icon
dragImage.fill(0xffffffff);
@@ -480,6 +483,7 @@ QList<ItemLibraryInfo> ItemLibraryModel::itemLibraryRepresentations(const QStrin
itemLibraryRepresentation.setCategory(nodeInfo.category());
}
}
}
return itemLibraryRepresentationList;
}