From cedc041b19239db48063d224f62fb29fb872b437 Mon Sep 17 00:00:00 2001 From: James Mudd Date: Tue, 14 Nov 2017 14:24:25 +0000 Subject: [PATCH] [I18-117] Add a case to NumberBox.getNumericValue(String) This fixes a bug where a listener was not fired when scientific notation was entered into a NumberBox. Signed-off-by: James Mudd --- .../org/eclipse/richbeans/widgets/scalebox/NumberBox.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/org.eclipse.richbeans.widgets/src/org/eclipse/richbeans/widgets/scalebox/NumberBox.java b/org.eclipse.richbeans.widgets/src/org/eclipse/richbeans/widgets/scalebox/NumberBox.java index 04dff68..20bfedf 100644 --- a/org.eclipse.richbeans.widgets/src/org/eclipse/richbeans/widgets/scalebox/NumberBox.java +++ b/org.eclipse.richbeans.widgets/src/org/eclipse/richbeans/widgets/scalebox/NumberBox.java @@ -651,6 +651,11 @@ public double getNumericValue(String txt) { } } } + try { + return Double.valueOf(txt); + } catch (java.lang.NumberFormatException ne) { + // Fall through. + } return Double.NaN; }