From 84cce815e5744c52e710e5b1fd4029ca43d2e83b Mon Sep 17 00:00:00 2001 From: AJ Date: Wed, 17 Jun 2020 07:33:38 -0400 Subject: [PATCH] Allow length input as fraction --- CutToLength/UIItem.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CutToLength/UIItem.cs b/CutToLength/UIItem.cs index ffd5d7e..11cac22 100644 --- a/CutToLength/UIItem.cs +++ b/CutToLength/UIItem.cs @@ -19,9 +19,11 @@ namespace CutToLength { try { + var input = Fraction.ReplaceFractionsWithDecimals(LengthInputValue); + double d; - if (double.TryParse(LengthInputValue, out d)) + if (double.TryParse(input, out d)) { LengthInputValue += "\""; return d;