diff --git a/src/ChangeLog b/src/ChangeLog index 0933ebb2ea..649198c97c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2001-08-20 Dekel Tsur + + * Spacing.h (Spacing): Set space to Default on in the default + constructor. + 2001-08-19 Lars Gullik Bjønnes * vc-backend.h (RCS::versionString): add RCS to version diff --git a/src/Spacing.h b/src/Spacing.h index d164e8eb76..9c8fdec9d4 100644 --- a/src/Spacing.h +++ b/src/Spacing.h @@ -37,7 +37,7 @@ public: Default }; /// - Spacing() : space(Single), value(1.0) {} + Spacing() : space(Default), value(1.0) {} /// Spacing(Spacing::Space sp, float val = 1.0) { set(sp, val); diff --git a/src/frontends/xforms/ChangeLog b/src/frontends/xforms/ChangeLog index 9e37df1c58..2f1514cc97 100644 --- a/src/frontends/xforms/ChangeLog +++ b/src/frontends/xforms/ChangeLog @@ -1,3 +1,8 @@ +2001-08-20 Dekel Tsur + + * FormParagraph.C (general_apply): Handle default spacing. + (general_update): Ditto. + 2001-08-20 Angus Leeming * FormBibtex.C: diff --git a/src/frontends/xforms/FormParagraph.C b/src/frontends/xforms/FormParagraph.C index 72620c05a6..da150ee707 100644 --- a/src/frontends/xforms/FormParagraph.C +++ b/src/frontends/xforms/FormParagraph.C @@ -127,7 +127,7 @@ void FormParagraph::build() "| Medskip | Bigskip | VFill | Length ")); fl_addto_choice(general_->choice_linespacing, - _(" Single | OneHalf | Double | Other ")); + _(" Default | Single | OneHalf | Double | Other ")); fl_set_input_return(general_->input_space_above, FL_RETURN_CHANGED); fl_set_input_return(general_->input_space_below, FL_RETURN_CHANGED); @@ -192,8 +192,6 @@ void FormParagraph::general_apply() LyXAlignment align; string labelwidthstring; bool noindent; - Spacing::Space linespacing; - string other_linespacing; // If a vspace kind is "Length" but there's no text in // the input field, reset the kind to "None". @@ -277,11 +275,14 @@ void FormParagraph::general_apply() labelwidthstring = fl_get_input(general_->input_labelwidth); noindent = fl_get_button(general_->check_noindent); + Spacing::Space linespacing; + string other_linespacing; switch (fl_get_choice(general_->choice_linespacing)) { - case 1: linespacing = Spacing::Single; break; - case 2: linespacing = Spacing::Onehalf; break; - case 3: linespacing = Spacing::Double; break; - case 4: + case 1: linespacing = Spacing::Default; break; + case 2: linespacing = Spacing::Single; break; + case 3: linespacing = Spacing::Onehalf; break; + case 4: linespacing = Spacing::Double; break; + case 5: linespacing = Spacing::Other; other_linespacing = fl_get_input(general_->input_linespacing); break; @@ -358,22 +359,23 @@ void FormParagraph::general_update() int linespacing; Spacing space = par_->params().spacing(); - + + /* switch (lv_->buffer()->params.spacing.getSpace()) { - case Spacing::Single: linespacing = 1; break; - case Spacing::Onehalf: linespacing = 2; break; - case Spacing::Double: linespacing = 3; break; - case Spacing::Other: linespacing = 4; break; + case Spacing::Default: linespacing = 1; break; + case Spacing::Single: linespacing = 2; break; + case Spacing::Onehalf: linespacing = 3; break; + case Spacing::Double: linespacing = 4; break; + case Spacing::Other: linespacing = 5; break; } + */ switch (space.getSpace()) { - case Spacing::Single: linespacing = 1; break; - case Spacing::Onehalf: linespacing = 2; break; - case Spacing::Double: linespacing = 3; break; - case Spacing::Other: linespacing = 4; break; - case Spacing::Default: - space = lv_->buffer()->params.spacing; - break; + case Spacing::Default: linespacing = 1; break; + case Spacing::Single: linespacing = 2; break; + case Spacing::Onehalf: linespacing = 3; break; + case Spacing::Double: linespacing = 4; break; + case Spacing::Other: linespacing = 5; break; } fl_set_choice(general_->choice_linespacing, linespacing); if (space.getSpace() == Spacing::Other) {