Skip to content
Snippets Groups Projects
Commit 09228db1 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

MesocrystalItem w/o materials

parent 2d6c67e6
No related branches found
No related tags found
1 merge request!2676rm file/class Attributes (#1012)
......@@ -29,7 +29,6 @@ const QString MaterialId("MaterialId");
ItemWithMaterial::ItemWithMaterial(const MaterialsSet* materialModel)
: m_materials(materialModel)
{
ASSERT(m_materials);
}
void ItemWithMaterial::setMaterial(const MaterialItem* materialItem)
......
......@@ -47,9 +47,8 @@ const QString position_tooltip = "Relative position of the mesocrystal's referen
} // namespace
MesocrystalItem::MesocrystalItem(const MaterialsSet* materials)
MesocrystalItem::MesocrystalItem(const MaterialsSet*)
: ItemWithParticles(abundance_tooltip, position_tooltip)
, m_materials(materials)
{
m_vectorA.init("First lattice vector (nm)", "Coordinates of the first lattice vector",
"vectorA");
......@@ -59,7 +58,7 @@ MesocrystalItem::MesocrystalItem(const MaterialsSet* materials)
"vectorC");
m_outer_shape.initWithArgs("Outer Shape", "", FormfactorsCatalog::Type::Box);
m_basis_particle.initWithArgs("Basis", "", ParticlesCatalog::Type::Particle, materials);
m_basis_particle.initWithArgs("Basis", "", ParticlesCatalog::Type::Particle, nullptr);
}
void MesocrystalItem::writeTo(QXmlStreamWriter* w) const
......@@ -92,7 +91,8 @@ void MesocrystalItem::readFrom(QXmlStreamReader* r)
else if (tag == Tag::OuterShape)
XML::readTaggedElement(r, tag, m_outer_shape);
else if (tag == Tag::BasisParticle) {
m_basis_particle.readFrom(r, m_materials);
MaterialsSet* dummy = nullptr;
m_basis_particle.readFrom(r, dummy); // TODO rm dummy arg
XML::gotoEndElementOfTag(r, tag);
} else if (tag == Tag::ExpandMesocrystalGroupbox)
expandMesocrystal = XML::readTaggedBool(r, tag);
......
......@@ -72,7 +72,6 @@ private:
VectorProperty m_vectorC;
PolyItem<FormfactorsCatalog> m_outer_shape;
PolyItem<ParticlesCatalog> m_basis_particle;
const MaterialsSet* m_materials;
};
template <typename T> T* MesocrystalItem::setOuterShapeType()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment