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

rm 2 more uses of initWithInitializer

parent b62e8e5b
No related branches found
No related tags found
1 merge request!2686rm fct PolyItem::initWithInitializer and member PolyItem::m_initializer
...@@ -41,8 +41,7 @@ double BeamAzimuthalAngleItem::scaleFactor() const ...@@ -41,8 +41,7 @@ double BeamAzimuthalAngleItem::scaleFactor() const
BeamInclinationAngleItem::BeamInclinationAngleItem() BeamInclinationAngleItem::BeamInclinationAngleItem()
{ {
m_distribution.initWithInitializer("Distribution", "", DistributionCatalog::types(), m_distribution.simpleInit("Distribution", "", DistributionCatalog::Type::None);
initDistribution);
} }
void BeamInclinationAngleItem::readFrom(QXmlStreamReader* r) void BeamInclinationAngleItem::readFrom(QXmlStreamReader* r)
...@@ -59,11 +58,3 @@ double BeamInclinationAngleItem::scaleFactor() const ...@@ -59,11 +58,3 @@ double BeamInclinationAngleItem::scaleFactor() const
{ {
return Units::deg; return Units::deg;
} }
void BeamInclinationAngleItem::initDistribution(DistributionItem* new_distribution,
const DistributionItem* old_distribution)
{
ASSERT(new_distribution);
new_distribution->center().setDVal(old_distribution ? old_distribution->center().dVal() : 0.2);
new_distribution->center().setDecimals(3);
}
...@@ -35,10 +35,6 @@ public: ...@@ -35,10 +35,6 @@ public:
double inclinationAngle() const; double inclinationAngle() const;
double scaleFactor() const override; double scaleFactor() const override;
private:
static void initDistribution(DistributionItem* newDistribution,
const DistributionItem* currentDistribution);
}; };
#endif // BORNAGAIN_GUI_MODEL_BEAM_BEAMANGLEITEMS_H #endif // BORNAGAIN_GUI_MODEL_BEAM_BEAMANGLEITEMS_H
...@@ -44,14 +44,6 @@ void setAxisPresentationDefaults(BasicAxisItem* axisItem) ...@@ -44,14 +44,6 @@ void setAxisPresentationDefaults(BasicAxisItem* axisItem)
axisItem->resize(500); axisItem->resize(500);
} }
void initDistribution(DistributionItem* new_distribution, const DistributionItem* old_distribution)
{
ASSERT(new_distribution);
new_distribution->center().setDVal(old_distribution ? old_distribution->center().dVal() : 0.);
new_distribution->center().setDecimals(4);
new_distribution->center().setLimits(RealLimits::positive());
};
} // namespace } // namespace
...@@ -59,8 +51,7 @@ GrazingScanItem::GrazingScanItem() ...@@ -59,8 +51,7 @@ GrazingScanItem::GrazingScanItem()
: BeamDistributionItem() : BeamDistributionItem()
, m_current_axis_is_uniform_axis(true) , m_current_axis_is_uniform_axis(true)
{ {
m_distribution.initWithInitializer("Distribution", "", DistributionCatalog::types(), m_distribution.simpleInit("Distribution", "", DistributionCatalog::Type::None);
initDistribution);
m_uniform_alpha_axis = std::make_unique<BasicAxisItem>(); m_uniform_alpha_axis = std::make_unique<BasicAxisItem>();
setAxisPresentationDefaults(m_uniform_alpha_axis.get()); setAxisPresentationDefaults(m_uniform_alpha_axis.get());
......
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