Commit f88175fb authored by Mikhail Svechnikov's avatar Mikhail Svechnikov Committed by Mikhail Svechnikov
Browse files

on destruction

parent 0d354660
......@@ -154,7 +154,7 @@ void IntensityDataPropertyWidget::setItem(QVector<IntensityDataItem*> itemsVec)
this);
#else
FOR_EACH_ITEM
connect(item, &IntensityDataItem::axesUnitsChanged, this, [=]() {
connect(item, &IntensityDataItem::axesUnitsChanged, this, [=](){
if(jobItem()) {
item->blockSignals(true);
item->updateCoords(jobItem()->instrumentItem());
......@@ -163,6 +163,16 @@ void IntensityDataPropertyWidget::setItem(QVector<IntensityDataItem*> itemsVec)
}
});
#endif
for(int i=0; i<itemsVec.size(); i++)
if(itemsVec[i])
#ifdef USE_MAPPERS
itemsVec[i]->mapper()->setOnItemDestroy(
[this, i](SessionItem*) { m_items_vec[i] = nullptr; }, this);
#else
connect(itemsVec[i], &IntensityDataItem::destroyed, this,
[=]() { m_items_vec[i] = nullptr; });
#endif
}
const JobItem* IntensityDataPropertyWidget::jobItem() const
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment