...
 
Commits (1)
......@@ -73,7 +73,7 @@ bool POSCARExporter::exportObject(SceneNode* sceneNode, int frameNumber, TimePoi
for(auto c = particleCounts.begin(); c != particleCounts.end(); ++c) {
ElementType* particleType = particleTypeProperty->elementType(c.key());
if(particleType) {
QString typeName = particleType->name();
QString typeName = particleType->nameOrId();
typeName.replace(' ', '_');
textStream() << typeName << ' ';
}
......
......@@ -53,7 +53,7 @@ QVariant StructureListParameterUI::getItemData(RefTarget* target, const QModelIn
if(stype && modifier && modApp) {
if(role == Qt::DisplayRole) {
if(index.column() == 1)
return stype->name();
return stype->nameOrId();
else if(index.column() == 2) {
if(stype->id() >= 0 && stype->id() < modApp->structureCounts().size())
return (int)modApp->structureCounts()[stype->id()];
......
......@@ -420,8 +420,10 @@ QString BondPickInfo::infoString(PipelineSceneNode* objectNode, quint32 subobjec
if(property->dataType() == PropertyStorage::Int) {
str += QString::number(property->getIntComponent(bondIndex, component));
if(property->elementTypes().empty() == false) {
if(ElementType* btype = property->elementType(property->getIntComponent(bondIndex, component)))
str += QString(" (%1)").arg(btype->name());
if(ElementType* btype = property->elementType(property->getIntComponent(bondIndex, component))) {
if(!btype->name().isEmpty())
str += QString(" (%1)").arg(btype->name());
}
}
}
else if(property->dataType() == PropertyStorage::Int64)
......@@ -437,7 +439,7 @@ QString BondPickInfo::infoString(PipelineSceneNode* objectNode, quint32 subobjec
ElementType* type1 = typeProperty->elementType(typeProperty->getInt(index1));
ElementType* type2 = typeProperty->elementType(typeProperty->getInt(index2));
if(type1 && type2) {
str += QString(" | Particles: %1 - %2").arg(type1->name(), type2->name());
str += QString(" | Particles: %1 - %2").arg(type1->nameOrId(), type2->nameOrId());
}
}
}
......
......@@ -918,8 +918,10 @@ QString ParticlePickInfo::particleInfoString(const PipelineFlowState& pipelineSt
if(property->dataType() == PropertyStorage::Int) {
str += QString::number(property->getIntComponent(particleIndex, component));
if(property->elementTypes().empty() == false) {
if(ElementType* ptype = property->elementType(property->getIntComponent(particleIndex, component)))
str += QString(" (%1)").arg(ptype->name());
if(ElementType* ptype = property->elementType(property->getIntComponent(particleIndex, component))) {
if(!ptype->name().isEmpty())
str += QString(" (%1)").arg(ptype->name());
}
}
}
else if(property->dataType() == PropertyStorage::Int64) {
......
......@@ -210,8 +210,10 @@ QVariant PropertyInspectionApplet::PropertyTableModel::data(const QModelIndex& i
if(property->dataType() == PropertyStorage::Int) {
str += QString::number(property->getIntComponent(elementIndex, component));
if(property->elementTypes().empty() == false) {
if(ElementType* ptype = property->elementType(property->getIntComponent(elementIndex, component)))
str += QStringLiteral(" (%1)").arg(ptype->name());
if(ElementType* ptype = property->elementType(property->getIntComponent(elementIndex, component))) {
if(!ptype->name().isEmpty())
str += QStringLiteral(" (%1)").arg(ptype->name());
}
}
}
else if(property->dataType() == PropertyStorage::Int64) {
......