mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Fix paragraph spacing
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2562 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
7e7a107039
commit
32ef0d04c4
@ -1,3 +1,8 @@
|
||||
2001-08-20 Dekel Tsur <dekelts@tau.ac.il>
|
||||
|
||||
* Spacing.h (Spacing): Set space to Default on in the default
|
||||
constructor.
|
||||
|
||||
2001-08-19 Lars Gullik Bjønnes <larsbj@birdstep.com>
|
||||
|
||||
* vc-backend.h (RCS::versionString): add RCS to version
|
||||
|
@ -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);
|
||||
|
@ -1,3 +1,8 @@
|
||||
2001-08-20 Dekel Tsur <dekelts@tau.ac.il>
|
||||
|
||||
* FormParagraph.C (general_apply): Handle default spacing.
|
||||
(general_update): Ditto.
|
||||
|
||||
2001-08-20 Angus Leeming <a.leeming@ic.ac.uk>
|
||||
|
||||
* FormBibtex.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;
|
||||
@ -359,21 +360,22 @@ 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) {
|
||||
|
Loading…
Reference in New Issue
Block a user