From 409d36df30f99961e5378e1a5095c988533d356b Mon Sep 17 00:00:00 2001 From: wmayer Date: Sat, 5 Feb 2022 17:54:55 +0100 Subject: [PATCH] App: [skip ci] fix regression in ColorGradient/ColorField --- src/App/ColorModel.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/App/ColorModel.cpp b/src/App/ColorModel.cpp index 27375cad9d..b06a9360e9 100644 --- a/src/App/ColorModel.cpp +++ b/src/App/ColorModel.cpp @@ -107,7 +107,7 @@ ColorField& ColorField::operator = (const ColorField &rclCF) void ColorField::set (const ColorModel &rclModel, float fMin, float fMax, std::size_t usCt) { auto bounds = std::minmax(fMin, fMax); - if (bounds.first <= bounds.second) { + if (bounds.second <= bounds.first) { throw Base::ValueError("Maximum must be higher than minimum"); } @@ -212,7 +212,7 @@ std::vector ColorGradient::getColorModelNames() const void ColorGradient::set (float fMin, float fMax, std::size_t usCt, TStyle tS, bool bOG) { auto bounds = std::minmax(fMin, fMax); - if (bounds.first <= bounds.second) { + if (bounds.second <= bounds.first) { throw Base::ValueError("Maximum must be higher than minimum"); }