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

rm DistributionItem::hasRelSamplingWidth

parent 05712ad2
No related branches found
No related tags found
1 merge request!2639DoubleProperty disambiguate fcts -> dVal, setDVal; rm casting operator
......@@ -45,11 +45,6 @@ void DistributionItem::initRelSamplingWidth()
m_rel_sampling_width.init("Rel. sampling width", "", 2.0, "relSamplingWidth");
}
bool DistributionItem::hasRelSamplingWidth() const
{
return m_rel_sampling_width.isInitialized();
}
void DistributionItem::writeTo(QXmlStreamWriter* w) const
{
XML::writeAttribute(w, XML::Attrib::version, uint(1));
......@@ -60,11 +55,9 @@ void DistributionItem::writeTo(QXmlStreamWriter* w) const
w->writeEndElement();
// relative sampling width
if (hasRelSamplingWidth()) {
w->writeStartElement(Tag::RelSamplingWidth);
m_rel_sampling_width.writeTo(w);
w->writeEndElement();
}
w->writeStartElement(Tag::RelSamplingWidth);
m_rel_sampling_width.writeTo(w);
w->writeEndElement();
}
void DistributionItem::readFrom(QXmlStreamReader* r)
......
......@@ -39,8 +39,6 @@ public:
const DoubleProperty& relSamplingWidth() const { return m_rel_sampling_width; }
void setRelSamplingWidth(double v) { m_rel_sampling_width.setValue(v); }
bool hasRelSamplingWidth() const;
//! Serialization of contents.
//!
//! Important: limits will not be serialized here. They have
......
......@@ -168,9 +168,7 @@ void setDistribution(BeamDistributionItem* pdi, ParameterDistribution par_distr)
DistributionItem* distItem = pdi->distributionItem();
distItem->setNumberOfSamples((int)par_distr.nDraws());
if (distItem->hasRelSamplingWidth())
distItem->setRelSamplingWidth(par_distr.relSamplingWidth());
distItem->setRelSamplingWidth(par_distr.relSamplingWidth());
}
void addDistributionToItem(BeamDistributionItem* pdi, const IDistribution1D* distribution)
......
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