* @brief Swaps inverted (min > max) FFT / plot / widget range pairs from legacy projects. */
| 1321 | * @brief Swaps inverted (min > max) FFT / plot / widget range pairs from legacy projects. |
| 1322 | */ |
| 1323 | inline void normalizeDatasetRanges(Dataset& d) |
| 1324 | { |
| 1325 | if (d.fftMin > d.fftMax) |
| 1326 | std::swap(d.fftMin, d.fftMax); |
| 1327 | |
| 1328 | if (d.pltMin > d.pltMax) |
| 1329 | std::swap(d.pltMin, d.pltMax); |
| 1330 | |
| 1331 | if (d.wgtMin > d.wgtMax) |
| 1332 | std::swap(d.wgtMin, d.wgtMax); |
| 1333 | } |
| 1334 | |
| 1335 | /** |
| 1336 | * @brief Deserializes a Dataset from a QJsonObject. |