Commit bb12283f authored by Oliver Bock's avatar Oliver Bock

Optimized visualization of capped values

parent e27978d5
...@@ -166,8 +166,13 @@ void PulsatingScience::updatePulsarSemiMajorAxisValue(double value) ...@@ -166,8 +166,13 @@ void PulsatingScience::updatePulsarSemiMajorAxisValue(double value)
{ {
ui.sliderPulsarSemiMajorAxis->setValue(value * 1000.0); ui.sliderPulsarSemiMajorAxis->setValue(value * 1000.0);
if(value < 1.0 || value > 20.0) { if((int)value <= 1 || (int)value >= 20) {
ui.lcdPulsarSemiMajorAxis->setStyleSheet("color: red"); 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)); ui.lcdPulsarSemiMajorAxis->display(QString::number(value, 'f', 1));
} }
} }
Markdown is supported
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