Skip to content
Snippets Groups Projects
Commit 21609d4c authored by m.puchner's avatar m.puchner
Browse files

Merge branch 'fixes' into 'main'

crash fix, behavior fix and cleanup

See merge request !647
parents fe853abd 89b63582
No related branches found
No related tags found
1 merge request!647crash fix, behavior fix and cleanup
Pipeline #56477 passed
......@@ -109,10 +109,8 @@ void RectangularDetectorItem::serialize(Serializer& s)
s.rw(m_v0);
s.rw(m_distance);
if (s.isReading()) {
m_detectorAlignment = static_cast<RectangularDetector::EDetectorArrangement>(alignment);
updateTooltips();
}
if (s.isReading())
setDetectorAlignment(static_cast<RectangularDetector::EDetectorArrangement>(alignment));
}
void RectangularDetectorItem::setDetectorAlignment(
......
......@@ -129,6 +129,7 @@ void InstrumentLibraryEditor::execAdd(const InstrumentItem& instrumentToAdd)
m_ui->buttonBox->button(QDialogButtonBox::Cancel)->hide();
QModelIndex index = m_treeModel->indexForItem(addedInstrument);
m_ui->treeView->expandAll();
m_ui->treeView->setCurrentIndex(index);
m_ui->treeView->scrollTo(index, QAbstractItemView::PositionAtTop);
setModal(true);
......
......@@ -99,6 +99,8 @@ void IntensityDataPropertyWidget::setItem(IntensityDataItem* item)
// react on external changes (e.g. zooming in customplot shall update the axis values)
item->mapper()->setOnChildPropertyChange(
[=](SessionItem*, const QString&) { updateUIValues(); }, this);
item->mapper()->setOnItemDestroy([this](SessionItem*) { m_item = nullptr; }, this);
}
QWidget* IntensityDataPropertyWidget::createDoubleSpinbox(DoubleDescriptor d)
......
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