Re: [Patch] Bug 3303: "Up" button in Table of Content will delete text

2007-03-19 Thread Jean-Marc Lasgouttes
> "Bernhard" == Bernhard Roider <[EMAIL PROTECTED]> writes: Bernhard> Bernhard Roider wrote: >> Hello, >> >> description of bug 3303: moving the last section up in the toc >> dialog eats the new last paragraph. This patch fixes that, BUT ... Bernhard> This one works now: Bernhard> The probl

Re: [Patch] Bug 3303: "Up" button in Table of Content will delete text

2007-03-05 Thread Bernhard Roider
Abdelrazak Younes wrote: Bernhard Roider wrote: Abdelrazak Younes wrote: Bernhard Roider wrote: Bernhard Roider wrote: Hello, description of bug 3303: moving the last section up in the toc dialog eats the new last paragraph. This patch fixes that, BUT ... This one works now: I committed

Re: [Patch] Bug 3303: "Up" button in Table of Content will delete text

2007-03-05 Thread Abdelrazak Younes
Bernhard Roider wrote: Abdelrazak Younes wrote: Bernhard Roider wrote: Bernhard Roider wrote: Hello, description of bug 3303: moving the last section up in the toc dialog eats the new last paragraph. This patch fixes that, BUT ... This one works now: I committed this one. I hope that you

Re: [Patch] Bug 3303: "Up" button in Table of Content will delete text

2007-03-05 Thread Bernhard Roider
Abdelrazak Younes wrote: Bernhard Roider wrote: Bernhard Roider wrote: Hello, description of bug 3303: moving the last section up in the toc dialog eats the new last paragraph. This patch fixes that, BUT ... This one works now: I committed this one. I hope that you will be able to commit

Re: [Patch] Bug 3303: "Up" button in Table of Content will delete text

2007-03-05 Thread Abdelrazak Younes
Bernhard Roider wrote: Bernhard Roider wrote: Hello, description of bug 3303: moving the last section up in the toc dialog eats the new last paragraph. This patch fixes that, BUT ... This one works now: I committed this one. I hope that you will be able to commit your next contribution by

Re: [Patch] Bug 3303: "Up" button in Table of Content will delete text

2007-03-04 Thread Bernhard Roider
Bernhard Roider wrote: Hello, description of bug 3303: moving the last section up in the toc dialog eats the new last paragraph. This patch fixes that, BUT ... This one works now: The problem was that pit is a reference to cur.pit() and was set to lastpit() + 1 before calling recordUndo(cur

Re: [Patch] Bug 3303: "Up" button in Table of Content will delete text

2007-03-04 Thread Abdelrazak Younes
Bernhard Roider wrote: Abdelrazak Younes wrote: Bernhard Roider wrote: Hello, description of bug 3303: moving the last section up in the toc dialog eats the new last paragraph. This patch fixes that, BUT if you move the last paragraph up and press undo afterwards then lyx crashes because in

Re: [Patch] Bug 3303: "Up" button in Table of Content will delete text

2007-03-04 Thread Bernhard Roider
Abdelrazak Younes wrote: Bernhard Roider wrote: Hello, description of bug 3303: moving the last section up in the toc dialog eats the new last paragraph. This patch fixes that, BUT if you move the last paragraph up and press undo afterwards then lyx crashes because in the method BufferView::

Re: [Patch] Bug 3303: "Up" button in Table of Content will delete text

2007-03-04 Thread Abdelrazak Younes
Bernhard Roider wrote: the code in BufferView::center() is: CursorSlice & bot = cursor_.bottom(); TextMetrics & tm = text_metrics_[bot.text()]; pit_type const pit = bot.pit(); tm.redoParagraph(pit); ParagraphMetrics const & pm = tm.parMetrics(pit); so maybe tm.redoParagrap

Re: [Patch] Bug 3303: "Up" button in Table of Content will delete text

2007-03-04 Thread Abdelrazak Younes
Bernhard Roider wrote: Abdelrazak Younes wrote: pit_type const newpit = std::distance(bgn, dest); L1 pit_type const len = std::distance(start, finish); L2 pit += len; -pit = std::min(pit, cur.lastpit()); -recordUndo(cur, Undo::ATOMIC, ne

Re: [Patch] Bug 3303: "Up" button in Table of Content will delete text

2007-03-04 Thread Bernhard Roider
Abdelrazak Younes wrote: Bernhard Roider wrote: Hello, description of bug 3303: moving the last section up in the toc dialog eats the new last paragraph. This patch fixes that, BUT if you move the last paragraph up and press undo afterwards then lyx crashes because in the method BufferView::

Re: [Patch] Bug 3303: "Up" button in Table of Content will delete text

2007-03-04 Thread Bernhard Roider
Abdelrazak Younes wrote: Bernhard Roider wrote: Hello, description of bug 3303: moving the last section up in the toc dialog eats the new last paragraph. This patch fixes that, BUT if you move the last paragraph up and press undo afterwards then lyx crashes because in the method BufferView::

Re: [Patch] Bug 3303: "Up" button in Table of Content will delete text

2007-03-04 Thread Abdelrazak Younes
Bernhard Roider wrote: the commented line should be deleted in the code... Lars would have caught that I'm sure ;-) Index: src/toc.C === --- src/toc.C

Re: [Patch] Bug 3303: "Up" button in Table of Content will delete text

2007-03-04 Thread Abdelrazak Younes
Bernhard Roider wrote: Hello, description of bug 3303: moving the last section up in the toc dialog eats the new last paragraph. This patch fixes that, BUT if you move the last paragraph up and press undo afterwards then lyx crashes because in the method BufferView::center(): ... ParagraphMe

Re: [Patch] Bug 3303: "Up" button in Table of Content will delete text

2007-03-04 Thread Bernhard Roider
the commented line should be deleted in the code... Index: src/toc.C === --- src/toc.C (revision 17395) +++ src/toc.C (working copy) @@ -81,12 +81,13 @@ pit_type const newpit = std::distance(bgn, dest);

[Patch] Bug 3303: "Up" button in Table of Content will delete text

2007-03-04 Thread Bernhard Roider
Hello, description of bug 3303: moving the last section up in the toc dialog eats the new last paragraph. This patch fixes that, BUT if you move the last paragraph up and press undo afterwards then lyx crashes because in the method BufferView::center(): ... ParagraphMetrics const & pm = tm.par