From 5f8907a2ff03a7177ef1388259b5748c6febf688 Mon Sep 17 00:00:00 2001 From: Mark Liversedge Date: Mon, 1 Aug 2011 23:52:36 +0100 Subject: [PATCH] Fix RideEditor find dialog for 'between' The find dialog expected the between values to be small and high, this patch will find values between regardless of whether the search values are lo/hi or hi/lo. Fixes #351. --- src/RideEditor.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/RideEditor.cpp b/src/RideEditor.cpp index a258ad046..43a8ee578 100644 --- a/src/RideEditor.cpp +++ b/src/RideEditor.cpp @@ -1708,7 +1708,8 @@ FindDialog::find() switch(type->currentIndex()) { case 0 : // between - if (value >= from->value() && value <= to->value()) match = true; + if ((value >= from->value() && value <= to->value()) || + (value <= from->value() && value >= to->value())) match = true; break; case 1 : // not between