This trivial patch allows input of doubles only rather than complaining about non-doubles.
Ok to apply? Angus
Index: src/frontends/xforms/FormWrap.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/xforms/FormWrap.C,v retrieving revision 1.2 diff -u -p -r1.2 FormWrap.C --- src/frontends/xforms/FormWrap.C 25 Sep 2002 07:58:47 -0000 1.2 +++ src/frontends/xforms/FormWrap.C 1 Oct 2002 10:34:09 -0000 @@ -22,6 +22,7 @@ #include "helper_funcs.h" #include "debug.h" #include "xforms_helpers.h" +#include "input_validators.h" #include FORMS_H_LOCATION typedef FormCB<ControlWrap, FormDB<FD_wrap> > base_class; @@ -44,6 +45,8 @@ void FormWrap::build() string const choice = getStringFromVector(getLatexUnits(), "|"); fl_addto_choice(dialog_->choice_width_units, subst(choice, "%", "%%").c_str()); + fl_set_input_filter(dialog_->input_width, fl_float_filter); + // Manage the ok, apply and cancel/close buttons bc().setOK(dialog_->button_ok); bc().setApply(dialog_->button_apply); @@ -103,21 +106,9 @@ ButtonPolicy::SMInput FormWrap::input(FL ob == dialog_->radio_right || ob == dialog_->radio_outer || ob == dialog_->radio_default || + ob == dialog_->input_width || ob == dialog_->choice_width_units) return ButtonPolicy::SMI_VALID; - - // disallow senseless data - // warnings if input is senseless - if (ob == dialog_->input_width) { - string const input = getString(dialog_->input_width); - bool const invalid = !isValidLength(input) && !isStrDbl(input); - if (invalid) { - postWarning(_("Invalid Length!")); - action = ButtonPolicy::SMI_INVALID; - } else { - action = ButtonPolicy::SMI_VALID; - } - } return action; }