diff --git a/GUI/Model/Item/RectangularDetectorItem.cpp b/GUI/Model/Item/RectangularDetectorItem.cpp index f1b5f0208f3b9e3c43104d19d2b8ace5395d3ec9..e236f2c62a4554f95aab40e3ea0de57d458d81f8 100644 --- a/GUI/Model/Item/RectangularDetectorItem.cpp +++ b/GUI/Model/Item/RectangularDetectorItem.cpp @@ -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( diff --git a/GUI/View/Instrument/InstrumentLibraryEditor.cpp b/GUI/View/Instrument/InstrumentLibraryEditor.cpp index 1c9b5e785ca36aa7c039ef998d3dd49ed96f8a42..2953f62fddb7dcb0ce4b34a1f4af749485f148e0 100644 --- a/GUI/View/Instrument/InstrumentLibraryEditor.cpp +++ b/GUI/View/Instrument/InstrumentLibraryEditor.cpp @@ -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); diff --git a/GUI/View/PlotUtil/IntensityDataPropertyWidget.cpp b/GUI/View/PlotUtil/IntensityDataPropertyWidget.cpp index 9b2322307677f3c0a1d08814c1cf8b92362b498c..d804fd9f9c92b4bb00324930ae325f3c73c06e60 100644 --- a/GUI/View/PlotUtil/IntensityDataPropertyWidget.cpp +++ b/GUI/View/PlotUtil/IntensityDataPropertyWidget.cpp @@ -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)