]> git.lyx.org Git - features.git/commitdiff
Two small bugfixes for tabulars and cursor setting
authorJürgen Vigna <jug@sad.it>
Thu, 21 Oct 1999 12:39:45 +0000 (12:39 +0000)
committerJürgen Vigna <jug@sad.it>
Thu, 21 Oct 1999 12:39:45 +0000 (12:39 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@221 a592a061-630c-0410-9148-cb99ea01b6c8

ChangeLog
src/table.C
src/text2.C

index 7c76ce5d0ed227c6a3a1a57a8b7b5fd81cbb2685..030476af0877332477400a04d08784eb3861f3d4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>
 
        * src/insets/figinset.C: just commented some fl_free_form calls
index 11531464456f375c0b1e95da64cec45bc4e5270d..bd6ff67a1d2d83b9e7546bcfa4bb83b98b720692 100644 (file)
@@ -601,7 +601,8 @@ bool LyXTable::SetPWidth(int cell, string width)
         cellinfo_of_cell(fvcell)->p_width = width;
     } else {
         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;
 }
index 1c5848950b54fbe0fb57393192f7d5796d6c4b5d..6515b58c7aef9fdf121a4a9ebebbf47c00046c52 100644 (file)
@@ -2807,11 +2807,15 @@ void LyXText::SetCursorIntern(LyXParagraph *par, int pos)
                pos = par->PositionInParFromPos(pos);
                par = tmppar;
        }
-       if (par->IsDummy() && par->previous && 
+       if (par->IsDummy() && par->previous &&
            par->previous->footnoteflag == LyXParagraph::CLOSED_FOOTNOTE) {
-               while (par->previous && 
-                      par->previous->footnoteflag == LyXParagraph::CLOSED_FOOTNOTE){
+               while (par->previous &&
+                      ((par->previous->IsDummy() && par->previous->previous->footnoteflag == LyXParagraph::CLOSED_FOOTNOTE) ||
+                       (par->previous->footnoteflag == LyXParagraph::CLOSED_FOOTNOTE))) {
                        par = par->previous ;
+                       if (par->IsDummy() &&
+                           par->previous->footnoteflag == LyXParagraph::CLOSED_FOOTNOTE)
+                               pos += par->last + 1;
                }
                if (par->previous) {
                        par = par->previous;