From 907bf9d45902e37e30968f7030fc37392bb84343 Mon Sep 17 00:00:00 2001
From: Joachim Wuttke <j.wuttke@fz-juelich.de>
Date: Sat, 20 Jul 2024 17:27:37 +0200
Subject: [PATCH] CompoundItem w/o materials

---
 GUI/Model/Sample/CompoundItem.cpp | 7 +++----
 GUI/Model/Sample/CompoundItem.h   | 1 -
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/GUI/Model/Sample/CompoundItem.cpp b/GUI/Model/Sample/CompoundItem.cpp
index da27f3f98fe..064e50ee10e 100644
--- a/GUI/Model/Sample/CompoundItem.cpp
+++ b/GUI/Model/Sample/CompoundItem.cpp
@@ -44,11 +44,9 @@ const QString position_tooltip = "Relative position of the particle's reference
 } // namespace
 
 
-CompoundItem::CompoundItem(const MaterialsSet* materials)
+CompoundItem::CompoundItem(const MaterialsSet*)
     : ItemWithParticles(abundance_tooltip, position_tooltip)
-    , m_materials(materials)
 {
-    ASSERT(m_materials);
 }
 
 void CompoundItem::addItemWithParticleSelection(ItemWithParticles* particle)
@@ -87,7 +85,8 @@ void CompoundItem::readFrom(QXmlStreamReader* r)
         if (tag == Tag::BaseData)
             XML::readBaseElement<ItemWithParticles>(r, tag, this);
         else if (tag == Tag::Particle) {
-            m_particles.push_back(PolyItem<ParticlesCatalog>().readItemFrom(r, m_materials));
+            MaterialsSet* dummy = nullptr;
+            m_particles.push_back(PolyItem<ParticlesCatalog>().readItemFrom(r, dummy)); // TODO
             XML::gotoEndElementOfTag(r, tag);
         } else if (tag == Tag::ExpandCompoundGroupbox)
             expandCompound = XML::readTaggedBool(r, tag);
diff --git a/GUI/Model/Sample/CompoundItem.h b/GUI/Model/Sample/CompoundItem.h
index a14edcff50c..35444933c8e 100644
--- a/GUI/Model/Sample/CompoundItem.h
+++ b/GUI/Model/Sample/CompoundItem.h
@@ -41,7 +41,6 @@ public:
 
 private:
     OwningVector<ItemWithParticles> m_particles;
-    const MaterialsSet* m_materials;
 };
 
 #endif // BORNAGAIN_GUI_MODEL_SAMPLE_COMPOUNDITEM_H
-- 
GitLab