Two small bugfixes for tabulars and cursor setting

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@221 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Vigna 1999-10-21 12:39:45 +00:00
parent b8426b61f9
commit 93cba75629
3 changed files with 17 additions and 4 deletions

View File

@ -1,3 +1,11 @@
1999-10-21 Juergen Vigna <jug@sad.it>
* src/table.C (SetPWidth): Just a small fix so the alignment is not
set to left if I just remove the width entry (or it is empty).
* src/text2.C (SetCursorIntern): Fixed a bug calculating to use wrong
paragraph when having dummy paragraphs.
1999-10-20 Juergen Vigna <jug@sad.it> 1999-10-20 Juergen Vigna <jug@sad.it>
* src/insets/figinset.C: just commented some fl_free_form calls * src/insets/figinset.C: just commented some fl_free_form calls

View File

@ -601,7 +601,8 @@ bool LyXTable::SetPWidth(int cell, string width)
cellinfo_of_cell(fvcell)->p_width = width; cellinfo_of_cell(fvcell)->p_width = width;
} else { } else {
column_info[column_of_cell(fvcell)].p_width = width; column_info[column_of_cell(fvcell)].p_width = width;
SetAlignment(cell,LYX_ALIGN_LEFT); if (!width.empty()) // do this only if there is a width
SetAlignment(cell,LYX_ALIGN_LEFT);
} }
return true; return true;
} }

View File

@ -2807,11 +2807,15 @@ void LyXText::SetCursorIntern(LyXParagraph *par, int pos)
pos = par->PositionInParFromPos(pos); pos = par->PositionInParFromPos(pos);
par = tmppar; par = tmppar;
} }
if (par->IsDummy() && par->previous && if (par->IsDummy() && par->previous &&
par->previous->footnoteflag == LyXParagraph::CLOSED_FOOTNOTE) { par->previous->footnoteflag == LyXParagraph::CLOSED_FOOTNOTE) {
while (par->previous && while (par->previous &&
par->previous->footnoteflag == LyXParagraph::CLOSED_FOOTNOTE){ ((par->previous->IsDummy() && par->previous->previous->footnoteflag == LyXParagraph::CLOSED_FOOTNOTE) ||
(par->previous->footnoteflag == LyXParagraph::CLOSED_FOOTNOTE))) {
par = par->previous ; par = par->previous ;
if (par->IsDummy() &&
par->previous->footnoteflag == LyXParagraph::CLOSED_FOOTNOTE)
pos += par->last + 1;
} }
if (par->previous) { if (par->previous) {
par = par->previous; par = par->previous;