Skip to content
Snippets Groups Projects
Commit bb12283f authored by Oliver Bock's avatar Oliver Bock
Browse files

Optimized visualization of capped values

parent e27978d5
No related branches found
No related tags found
No related merge requests found
......@@ -166,8 +166,13 @@ void PulsatingScience::updatePulsarSemiMajorAxisValue(double value)
{
ui.sliderPulsarSemiMajorAxis->setValue(value * 1000.0);
if(value < 1.0 || value > 20.0) {
if((int)value <= 1 || (int)value >= 20) {
if((int)value < 1 || (int)value > 20) {
ui.lcdPulsarSemiMajorAxis->setStyleSheet("color: red");
}
else {
ui.lcdPulsarSemiMajorAxis->setStyleSheet("color: black");
}
ui.lcdPulsarSemiMajorAxis->display(QString::number(value, 'f', 1));
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment