-----------------------------------------------------------------------------
| 168 | |
| 169 | //----------------------------------------------------------------------------- |
| 170 | void DataColorOptions::updateMaximum() |
| 171 | { |
| 172 | QTE_D(); |
| 173 | |
| 174 | if (d->UI.autoMaximum->isChecked()) |
| 175 | { |
| 176 | auto const softLimit = |
| 177 | (d->UI.autoMinimum->isChecked() ? -qInf() : d->UI.minimum->value()); |
| 178 | d->UI.maximum->setValue(qMax(softLimit, d->autoUpper)); |
| 179 | } |
| 180 | |
| 181 | auto const limit = d->UI.maximum->value(); |
| 182 | if (d->UI.minimum->value() > limit) |
| 183 | { |
| 184 | d->UI.minimum->setValue(limit); |
| 185 | } |
| 186 | |
| 187 | d->scalarsToGradient->SetRange(d->UI.minimum->value(), |
| 188 | d->UI.maximum->value()); |
| 189 | |
| 190 | emit this->modified(); |
| 191 | } |
no test coverage detected