From f2e66a940af29288db948a1cf6a37ab8b1bbabec Mon Sep 17 00:00:00 2001 From: Angus Leeming Date: Mon, 11 Feb 2002 18:43:42 +0000 Subject: [PATCH] John's fix to the minipage dialog. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3523 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/xforms/ChangeLog | 5 +++++ src/frontends/xforms/FormMinipage.C | 14 +++++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/frontends/xforms/ChangeLog b/src/frontends/xforms/ChangeLog index 44720acf7d..40fd0667f1 100644 --- a/src/frontends/xforms/ChangeLog +++ b/src/frontends/xforms/ChangeLog @@ -1,4 +1,9 @@ +2002-02-11 John Levon + + * FormMinipage.C: return SMI_VALID on other form changes + 2002-02-10 Rob Lahaye + * forms/form_external.fd: * form_external.C: change color2 of a few buttons into the proper grey color. diff --git a/src/frontends/xforms/FormMinipage.C b/src/frontends/xforms/FormMinipage.C index 519f3c4559..6725bdd322 100644 --- a/src/frontends/xforms/FormMinipage.C +++ b/src/frontends/xforms/FormMinipage.C @@ -95,14 +95,17 @@ ButtonPolicy::SMInput FormMinipage::input(FL_OBJECT * ob, long) { ButtonPolicy::SMInput action = ButtonPolicy::SMI_NOOP; + if (ob == dialog_->radio_top || + ob == dialog_->radio_middle || + ob == dialog_->radio_bottom || + ob == dialog_->choice_width_units) + return ButtonPolicy::SMI_VALID; + // disallow senseless data // warnings if input is senseless - // - string input = fl_get_input(dialog_->input_width); - bool invalid = false; - if (ob == dialog_->input_width) { - invalid = !isValidLength(input) && !isStrDbl(input); + string const input = getStringFromInput(dialog_->input_width); + bool const invalid = !isValidLength(input) && !isStrDbl(input); if (invalid) { fl_set_object_label(dialog_->text_warning, _("Warning: Invalid Length!")); @@ -113,5 +116,6 @@ ButtonPolicy::SMInput FormMinipage::input(FL_OBJECT * ob, long) action = ButtonPolicy::SMI_VALID; } } + return action; } -- 2.39.2