Skip to content
Snippets Groups Projects
Commit 1ba1a9b9 authored by Matthias Puchner's avatar Matthias Puchner Committed by Wuttke, Joachim
Browse files

rm useless changed-check from onChanged handler

parent 251bf4d4
No related branches found
No related tags found
1 merge request!708Refactor and simplify UI
...@@ -110,10 +110,8 @@ DoubleSpinBox* DistributionSelector::createSpinBox(const DoubleDescriptor& d) ...@@ -110,10 +110,8 @@ DoubleSpinBox* DistributionSelector::createSpinBox(const DoubleDescriptor& d)
{ {
auto* sb = GUI::Util::createSpinBox(m_formLayout, d); auto* sb = GUI::Util::createSpinBox(m_formLayout, d);
connect(sb, &DoubleSpinBox::baseValueChanged, [=](double v) { connect(sb, &DoubleSpinBox::baseValueChanged, [=](double v) {
if (d.get() != v) { d.set(v);
d.set(v); emit distributionChanged();
emit distributionChanged();
}
}); });
return sb; return sb;
} }
...@@ -122,10 +120,8 @@ QSpinBox* DistributionSelector::createSpinBox(const UIntDescriptor& d) ...@@ -122,10 +120,8 @@ QSpinBox* DistributionSelector::createSpinBox(const UIntDescriptor& d)
{ {
auto* sb = GUI::Util::createSpinBox(m_formLayout, d); auto* sb = GUI::Util::createSpinBox(m_formLayout, d);
connect(sb, QOverload<int>::of(&QSpinBox::valueChanged), [=](int v) { connect(sb, QOverload<int>::of(&QSpinBox::valueChanged), [=](int v) {
if (d.get() != v) { d.set(v);
d.set(v); emit distributionChanged();
emit distributionChanged();
}
}); });
return sb; return sb;
} }
...@@ -136,10 +132,8 @@ void DistributionSelector::createMeanSpinBox(const DoubleDescriptor& d) ...@@ -136,10 +132,8 @@ void DistributionSelector::createMeanSpinBox(const DoubleDescriptor& d)
if (m_meanConfig->scientific) { if (m_meanConfig->scientific) {
auto* sb = GUI::Util::createScientificSpinBox(m_formLayout, d); auto* sb = GUI::Util::createScientificSpinBox(m_formLayout, d);
connect(sb, &ScientificSpinBox::valueChanged, [=](double v) { connect(sb, &ScientificSpinBox::valueChanged, [=](double v) {
if (d.get() != v) { d.set(v);
d.set(v); emit distributionChanged();
emit distributionChanged();
}
}); });
} else } else
createSpinBox(d); createSpinBox(d);
......
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