]> git.lyx.org Git - lyx.git/commitdiff
John's fix to the minipage dialog.
authorAngus Leeming <leeming@lyx.org>
Mon, 11 Feb 2002 18:43:42 +0000 (18:43 +0000)
committerAngus Leeming <leeming@lyx.org>
Mon, 11 Feb 2002 18:43:42 +0000 (18:43 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3523 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/xforms/ChangeLog
src/frontends/xforms/FormMinipage.C

index 44720acf7dce94d3b5ad1544b2996c82b427a390..40fd0667f136b80af8027a707f2d184d90c80383 100644 (file)
@@ -1,4 +1,9 @@
+2002-02-11  John Levon  <moz@compsoc.man.ac.uk>
+
+       * FormMinipage.C: return SMI_VALID on other form changes
 2002-02-10  Rob Lahaye  <lahaye@users.sourceforge.net>
        * forms/form_external.fd:
        * form_external.C: change color2 of a few buttons into the
        proper grey color.
index 519f3c455946d3794408b8207b90232128549c59..6725bdd3223588e9ec5dd810bc5134f796778db7 100644 (file)
@@ -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;
 }