diff --git a/GUI/Model/Model/SampleModel.cpp b/GUI/Model/Model/SampleModel.cpp index f4c8700d0a9842f8ded50170494ed2da47226a13..3bfccdc66474603246a51a326f4bff5ca6339353 100644 --- a/GUI/Model/Model/SampleModel.cpp +++ b/GUI/Model/Model/SampleModel.cpp @@ -25,16 +25,6 @@ QVector<MultiLayerItem*> SampleModel::multiLayerItems() const return m_multiLayers; } -QVector<ItemWithMaterial*> SampleModel::itemsWithMaterial() const -{ - QVector<ItemWithMaterial*> result; - - for (auto* m : m_multiLayers) - result << m->itemsWithMaterial(); - - return result; -} - MultiLayerItem* SampleModel::addMultiLayer() { m_multiLayers << new MultiLayerItem(); diff --git a/GUI/Model/Model/SampleModel.h b/GUI/Model/Model/SampleModel.h index ddb4cc45709c7bb9bd5681322c478e2872163b51..d73283368d09ad2636973784b3b3b58cb1799c86 100644 --- a/GUI/Model/Model/SampleModel.h +++ b/GUI/Model/Model/SampleModel.h @@ -18,7 +18,6 @@ #include <QVector> class MultiLayerItem; -class ItemWithMaterial; class Serializer; //! Main model to hold sample items. @@ -30,9 +29,6 @@ public: QVector<MultiLayerItem*> multiLayerItems() const; - //! Returns vector of SessionItems having MaterialProperty on board. - QVector<ItemWithMaterial*> itemsWithMaterial() const; - //! Adds a multilayer and returns the new item. MultiLayerItem* addMultiLayer(); void addMultiLayer(MultiLayerItem* multilayer); diff --git a/GUI/Model/Project/ProjectDocument.cpp b/GUI/Model/Project/ProjectDocument.cpp index ad4ba3b1499e3fb47d3a949c6a1b4e7c554e6349..696d7140414a81057ee49ac485445b8891049e3e 100644 --- a/GUI/Model/Project/ProjectDocument.cpp +++ b/GUI/Model/Project/ProjectDocument.cpp @@ -377,15 +377,6 @@ ProjectDocument::ReadResult ProjectDocument::readProject(QIODevice* device, } } - // make a sanity check whether all materials are present - for (const auto* multiLayerItem : m_samples.multiLayerItems()) - for (const auto* itemWithMaterial : multiLayerItem->itemsWithMaterial()) - if (itemWithMaterial->materialItem() == nullptr) { - QString message = QString("Material link is broken (id: '%1')") - .arg(itemWithMaterial->materialIdentifier()); - messageService.addError(this, message); - return ReadResult::error; - } } catch (DeserializationException& ex) { reader.raiseError(ex.text()); }