Skip to content
Snippets Groups Projects
Commit da60bab5 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

Revert "ditto for projections"

This reverts commit 0c51e391.
parent 2dedd203
No related branches found
No related tags found
1 merge request!2428Revert big refactoring of the last four days; to be redone more systematically
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include "Device/Mask/MaskStack.h" #include "Device/Mask/MaskStack.h"
#include "GUI/Model/Axis/AmplitudeAxisItem.h" #include "GUI/Model/Axis/AmplitudeAxisItem.h"
#include "GUI/Model/Axis/BasicAxisItem.h" #include "GUI/Model/Axis/BasicAxisItem.h"
#include "GUI/Model/Mask/MasksQModel.h"
#include "GUI/Model/Mask/MasksSet.h" #include "GUI/Model/Mask/MasksSet.h"
#include "GUI/Support/Data/ComboProperty.h" #include "GUI/Support/Data/ComboProperty.h"
#include "GUI/Support/Style/QCP_Util.h" #include "GUI/Support/Style/QCP_Util.h"
...@@ -365,18 +366,18 @@ Datafield* Data2DItem::createMaskedField() const ...@@ -365,18 +366,18 @@ Datafield* Data2DItem::createMaskedField() const
MasksSet* Data2DItem::projectionsSet() MasksSet* Data2DItem::projectionsSet()
{ {
return m_proj_model.get(); return m_proj_model ? m_proj_model->set() : nullptr;
} }
const MasksSet* Data2DItem::projectionsSet() const const MasksSet* Data2DItem::projectionsSet() const
{ {
return m_proj_model.get(); return m_proj_model ? m_proj_model->set() : nullptr;
} }
MasksSet* Data2DItem::getOrCreateProjectionModel() MasksQModel* Data2DItem::getOrCreateProjectionModel()
{ {
if (!m_proj_model) if (!m_proj_model)
m_proj_model = std::make_unique<MasksSet>(); m_proj_model = std::make_unique<MasksQModel>(new MasksSet);
return m_proj_model.get(); return m_proj_model.get();
} }
...@@ -83,7 +83,7 @@ public: ...@@ -83,7 +83,7 @@ public:
MasksSet* projectionsSet(); MasksSet* projectionsSet();
const MasksSet* projectionsSet() const; const MasksSet* projectionsSet() const;
MasksSet* getOrCreateProjectionModel(); MasksQModel* getOrCreateProjectionModel();
size_t rank() const override { return 2; } size_t rank() const override { return 2; }
//! Returns dimensions and axesbins of data //! Returns dimensions and axesbins of data
...@@ -115,7 +115,7 @@ private: ...@@ -115,7 +115,7 @@ private:
std::unique_ptr<ComboProperty> m_gradient; std::unique_ptr<ComboProperty> m_gradient;
std::unique_ptr<AmplitudeAxisItem> m_z_axis; std::unique_ptr<AmplitudeAxisItem> m_z_axis;
std::unique_ptr<MasksSet> m_model; std::unique_ptr<MasksSet> m_model;
std::unique_ptr<MasksSet> m_proj_model; std::unique_ptr<MasksQModel> m_proj_model;
}; };
#endif // BORNAGAIN_GUI_MODEL_DATA_DATA2DITEM_H #endif // BORNAGAIN_GUI_MODEL_DATA_DATA2DITEM_H
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