From ac53322bea5f98240b27386d33a0c5c66ddf24b6 Mon Sep 17 00:00:00 2001 From: Gennady Pospelov <g.pospelov@fz-juelich.de> Date: Thu, 23 Nov 2017 17:10:40 +0100 Subject: [PATCH] DetectorEditorWidget switched to new ComponentEditor. --- .../Views/InstrumentWidgets/DetectorEditorWidget.cpp | 6 +++--- GUI/coregui/Views/InstrumentWidgets/DetectorEditorWidget.h | 4 ++-- GUI/coregui/Views/PropertyEditor/ComponentEditor.h | 1 - 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/GUI/coregui/Views/InstrumentWidgets/DetectorEditorWidget.cpp b/GUI/coregui/Views/InstrumentWidgets/DetectorEditorWidget.cpp index 3ec9cdd0314..180e0d4aaeb 100644 --- a/GUI/coregui/Views/InstrumentWidgets/DetectorEditorWidget.cpp +++ b/GUI/coregui/Views/InstrumentWidgets/DetectorEditorWidget.cpp @@ -15,7 +15,7 @@ // ************************************************************************** // #include "DetectorEditorWidget.h" -#include "ObsoleteComponentBoxEditor.h" +#include "ComponentEditor.h" #include "DetectorItems.h" #include "SphericalDetectorItem.h" #include "RectangularDetectorItem.h" @@ -35,7 +35,7 @@ DetectorEditorWidget::DetectorEditorWidget(ColumnResizer* columnResizer, QWidget* parent) : SessionItemWidget(parent) , m_columnResizer(columnResizer) - , m_detectorTypeEditor(new ObsoleteComponentBoxEditor) + , m_detectorTypeEditor(new ComponentEditor(ComponentEditor::PlainWidget |ComponentEditor::W_NoChildren)) , m_groupBox(new GroupInfoBox("Detector Parameters")) , m_currentDetector(nullptr) , m_subDetectorWidget(nullptr) @@ -69,7 +69,7 @@ void DetectorEditorWidget::subscribeToItem() }, this); m_detectorTypeEditor->clearEditor(); - m_detectorTypeEditor->addItem(instrumentItem()->detectorGroup()); + m_detectorTypeEditor->setItem(instrumentItem()->detectorGroup()); init_SubDetector_Widget(); } diff --git a/GUI/coregui/Views/InstrumentWidgets/DetectorEditorWidget.h b/GUI/coregui/Views/InstrumentWidgets/DetectorEditorWidget.h index 1a41a228a84..79079483d29 100644 --- a/GUI/coregui/Views/InstrumentWidgets/DetectorEditorWidget.h +++ b/GUI/coregui/Views/InstrumentWidgets/DetectorEditorWidget.h @@ -21,7 +21,7 @@ class GroupInfoBox; class DetectorItem; -class ObsoleteComponentBoxEditor; +class ComponentEditor; class QGridLayout; class ColumnResizer; class InstrumentItem; @@ -48,7 +48,7 @@ private: InstrumentItem* instrumentItem(); ColumnResizer* m_columnResizer; - ObsoleteComponentBoxEditor* m_detectorTypeEditor; + ComponentEditor* m_detectorTypeEditor; GroupInfoBox* m_groupBox; DetectorItem* m_currentDetector; QWidget* m_subDetectorWidget; diff --git a/GUI/coregui/Views/PropertyEditor/ComponentEditor.h b/GUI/coregui/Views/PropertyEditor/ComponentEditor.h index 2804a63b407..ddb966f669f 100644 --- a/GUI/coregui/Views/PropertyEditor/ComponentEditor.h +++ b/GUI/coregui/Views/PropertyEditor/ComponentEditor.h @@ -74,5 +74,4 @@ private: Q_DECLARE_OPERATORS_FOR_FLAGS(ComponentEditor::EditorType) - #endif // COMPONENTEDITOR_H -- GitLab