]> git.lyx.org Git - lyx.git/commitdiff
form para crash fix from John
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 28 Nov 2001 11:04:31 +0000 (11:04 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 28 Nov 2001 11:04:31 +0000 (11:04 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3102 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/frontends/xforms/ChangeLog
src/frontends/xforms/FormParagraph.C
src/frontends/xforms/combox.C
src/vspace.C

index e34672c7bdea8478abee54bff3a86107e76680c7..e254a32727e219af020a1c0915e955667f78ad34 100644 (file)
@@ -1,3 +1,7 @@
+2001-11-26  John Levon  <moz@compsoc.man.ac.uk>
+
+       * vspace.C: initialise lyxgluelength on failure
+
 2001-11-28  Allan Rae  <rae@lyx.org>
 
        * text.C (paintLastRow): g++-2.95.3 and others don't like variable
index 93d7145c0070618582ffca66c77bb605ba2b2798..f3bb32c852fd13d16686afbd63cc755f09480a4d 100644 (file)
@@ -1,3 +1,8 @@
+2001-11-23  John Levon  <moz@compsoc.man.ac.uk>
+
+       * FormParagraph.C: allow signed space above/below, actually
+         use space below units
+
 2001-11-04  John Levon  <moz@compsoc.man.ac.uk>
 
        * FormToc.C: fixes to make floatlists work
index b7875a3d9501a65ec9ea94e775954838ea9af1c8..bf783aba18b835f548f77b548be876d817e17bf8 100644 (file)
@@ -120,8 +120,8 @@ void FormParagraph::build()
     fl_set_input_return(dialog_->input_labelwidth, FL_RETURN_CHANGED);
     fl_set_input_return(dialog_->input_linespacing, FL_RETURN_CHANGED);
     fl_set_input_filter(dialog_->input_linespacing, fl_unsigned_float_filter);
-    fl_set_input_filter(dialog_->input_space_above, fl_unsigned_float_filter);
-    fl_set_input_filter(dialog_->input_space_below, fl_unsigned_float_filter);
+    fl_set_input_filter(dialog_->input_space_above, fl_float_filter);
+    fl_set_input_filter(dialog_->input_space_below, fl_float_filter);
 
     // Create the contents of the unit choices
     // Don't include the "%" terms...
@@ -244,8 +244,10 @@ void FormParagraph::apply()
        space_bottom = VSpace(VSpace::VFILL);
        break;
     case 7:
-       space_bottom =
-               VSpace(LyXGlueLength(fl_get_input(dialog_->input_space_below)));
+       string const length =
+               getLengthFromWidgets(dialog_->input_space_below,
+               dialog_->choice_value_space_below);
+       space_bottom = VSpace(LyXGlueLength(length));
        break;
     }
     if (fl_get_button (dialog_->check_space_below))
index 3cbebf864d77a45c67d2aeea47754dafd32436ed..5edc3f6f03d2726b42927540911787759b915df9 100644 (file)
@@ -423,8 +423,7 @@ int Combox::peek_event(FL_FORM * form, void * xev)
        FL_OBJECT * ob = static_cast<FL_OBJECT *>(form->u_vdata);
        Combox * combo = static_cast<Combox*>(ob->u_vdata);
        
-       // I don't know why belowmouse does not work, but it doesn't. (Asger)
-       // Are we sure? Please verify. (Lgb)
+       // below mouse does not work like we need it 
        if (static_cast<XEvent *>(xev)->type == ButtonPress && (
                static_cast<XEvent *>(xev)->xbutton.x - ob->x < 0 ||
                static_cast<XEvent *>(xev)->xbutton.x - ob->x > ob->w ||
index 1d74f771035c5d1e4f56c969ea143ad4af08c561..d76439b000bc38c73cb0ede32def9fb3b71e6ad5 100644 (file)
@@ -361,16 +361,16 @@ LyXGlueLength::LyXGlueLength (string const & data)
 {
        LyXGlueLength tmp(0.0, PT);
 
-       if (!isValidGlueLength (data, &tmp))
-               return; // should raise an exception
-       else {
-               val = tmp.val;
-               uni = tmp.uni;
-               plus_val = tmp.plus_val;
-               plus_uni = tmp.plus_uni;
-               minus_val = tmp.minus_val;
-               minus_uni = tmp.minus_uni;
-       }
+       // we should really raise exception here
+       if (!isValidGlueLength(data, &tmp))
+               ;
+       val = tmp.val;
+       uni = tmp.uni;
+       plus_val = tmp.plus_val;
+       plus_uni = tmp.plus_uni;
+       minus_val = tmp.minus_val;
+       minus_uni = tmp.minus_uni;
 }