Explorar el Código

Set the max range of the min spinbox and ...

... the min range of the max spinbox
Julien Finet hace 14 años
padre
commit
5bae6f272b
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  1. 2 0
      Libs/Widgets/ctkRangeWidget.cpp

+ 2 - 0
Libs/Widgets/ctkRangeWidget.cpp

@@ -256,6 +256,8 @@ void ctkRangeWidget::setRange(double min, double max)
   double oldMin = d->MinimumSpinBox->minimum();
   double oldMax = d->MaximumSpinBox->maximum();
   d->MinimumSpinBox->setMinimum(qMin(min,max));
+  d->MinimumSpinBox->setMaximum(qMax(min,max));
+  d->MaximumSpinBox->setMinimum(qMin(min,max));
   d->MaximumSpinBox->setMaximum(qMax(min,max));
   // SpinBox can truncate the range (depending on decimals).
   // use Spinbox's range to set Slider's range