Skip to content
Snippets Groups Projects
Commit be627f94 authored by Matthias Puchner's avatar Matthias Puchner
Browse files

rectify behavior on model reset

parent 050bdaa8
No related branches found
No related tags found
1 merge request!405Introduce sample selection list
Pipeline #47244 passed
......@@ -26,14 +26,11 @@
SampleListModel::SampleListModel(QObject* parent, SampleModel* model)
: QAbstractListModel(parent), m_sampleModel(model)
{
connect(m_sampleModel, &SampleModel::modelAboutToBeReset, this, &SampleListModel::clear,
Qt::UniqueConnection);
}
connect(m_sampleModel, &SampleModel::modelAboutToBeReset, this,
&SampleListModel::beginResetModel, Qt::UniqueConnection);
void SampleListModel::clear()
{
beginResetModel();
endResetModel();
connect(m_sampleModel, &SampleModel::modelReset, this, &SampleListModel::endResetModel,
Qt::UniqueConnection);
}
MultiLayerItem* SampleListModel::topMostItem() const
......
......@@ -45,9 +45,6 @@ public:
QModelIndex createSampleFromExamples(const QString& className, const QString& title,
const QString& description);
private:
void clear();
private:
SampleModel* m_sampleModel = nullptr;
};
......
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