From d43177071628a87aa9e753d6432005bca259eb43 Mon Sep 17 00:00:00 2001 From: Daniel Kirschten Date: Mon, 18 May 2020 18:55:14 +0200 Subject: [PATCH] Fixed a bug in DoubleFieldEditor Only the integral part of entered values was saved to the preferences --- .../src/net/mograsim/plugin/util/DoubleFieldEditor.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/util/DoubleFieldEditor.java b/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/util/DoubleFieldEditor.java index acf99278..3641995f 100644 --- a/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/util/DoubleFieldEditor.java +++ b/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/util/DoubleFieldEditor.java @@ -59,7 +59,7 @@ public class DoubleFieldEditor extends StringFieldEditor * @param min the minimum allowed value (inclusive) * @param max the maximum allowed value (inclusive) */ - public void setValidRange(int min, int max) + public void setValidRange(double min, double max) { minValidValue = min; maxValidValue = max; @@ -131,7 +131,7 @@ public class DoubleFieldEditor extends StringFieldEditor if (text != null) { Double d = Double.valueOf(text.getText()); - getPreferenceStore().setValue(getPreferenceName(), d.intValue()); + getPreferenceStore().setValue(getPreferenceName(), d.doubleValue()); } } -- 2.17.1