Commit 2f423565 authored by Matthias Puchner's avatar Matthias Puchner
Browse files

fix double spinbox signaling twice

parent c2cea0fa
......@@ -37,11 +37,21 @@ QREDataLoaderProperties::QREDataLoaderProperties() : m_allowFactors(false)
for (int dataType = 0; dataType < 3; dataType++) {
connect(columnSpinBox(dataType), QOverload<int>::of(&QSpinBox::valueChanged),
[=]() { emit propertiesChanged(); });
// In the following: disable the checkbox before signaling propertyChanged to suppress ghost
// value changes in case the propertiesChanged signals triggers long calculations (the
// spinbox would see a timeout in its "pressed"-loop and generate a second value change)
connect(columnSpinBox(dataType), QOverload<int>::of(&QSpinBox::valueChanged), [=]() {
columnSpinBox(dataType)->setEnabled(false);
emit propertiesChanged();
columnSpinBox(dataType)->setEnabled(true);
});
connect(factorSpinBox(dataType), QOverload<double>::of(&QDoubleSpinBox::valueChanged),
[=]() { emit propertiesChanged(); });
[=]() {
factorSpinBox(dataType)->setEnabled(false);
emit propertiesChanged();
factorSpinBox(dataType)->setEnabled(true);
});
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment