Re: vector considered harmful.

2005-12-19 Thread Andre Poenitz
On Mon, Dec 19, 2005 at 11:27:18AM +0100, Jean-Marc Lasgouttes wrote: > > "Andre" == Andre Poenitz <[EMAIL PROTECTED]> writes: > > >> So why don't we just remove these swap calls and be done with it? > > Andre> The problem here is that we get a ParagraphList passed but use > Andre> some funct

Re: [Patch] redrawing bugs (Re: vector considered harmful.)

2005-12-19 Thread Martin Vermeer
On Mon, 2005-12-19 at 11:32 +0100, Jean-Marc Lasgouttes wrote: > > "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes: > > Martin> The other part of this patch reworked and tested. (Now I had > Martin> to include Delete :-) More code, but a lot clearer. > > Martin> OK to go in? > > Yes, w

Re: [Patch] redrawing bugs (Re: vector considered harmful.)

2005-12-19 Thread Jean-Marc Lasgouttes
> "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes: Martin> The other part of this patch reworked and tested. (Now I had Martin> to include Delete :-) More code, but a lot clearer. Martin> OK to go in? Yes, with the changes already requested by Lars. JMarc

Re: vector considered harmful.

2005-12-19 Thread Jean-Marc Lasgouttes
> "Andre" == Andre Poenitz <[EMAIL PROTECTED]> writes: >> So why don't we just remove these swap calls and be done with it? Andre> The problem here is that we get a ParagraphList passed but use Andre> some functions operating on InsetTexts there. Yes, Georg already pointed that out. So the

Re: vector considered harmful.

2005-12-18 Thread Andre Poenitz
On Mon, Dec 12, 2005 at 02:57:50PM +0100, Jean-Marc Lasgouttes wrote: > Andre> While I cannot see anything getting worse, the par id still go > Andre> up quickly. More precisely, the id of the first par of the > Andre> UserGuide is 6183. Hit enter on the first line, then go down to > Andre> the par

Re: [Patch] redrawing bugs (Re: vector considered harmful.)

2005-12-17 Thread Lars Gullik Bjønnes
Martin Vermeer <[EMAIL PROTECTED]> writes: | OK to go in? I won't make the call on that... tiny small comment though. | Index: text.C | === | RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/text.C,v | retrieving revision 1.637 | di

Re: [Patch] redrawing bugs (Re: vector considered harmful.)

2005-12-17 Thread Martin Vermeer
On Fri, Dec 16, 2005 at 12:41:04PM +0100, Jean-Marc Lasgouttes wrote: > > "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes: > > Martin> The really intended patch attached (curse Evo for not > Martin> displaying outgoing attachments!) > > It looks much better. LyXText::backspace could pro

Re: [Patch] redrawing bugs (Re: vector considered harmful.)

2005-12-16 Thread Martin Vermeer
On Fri, 2005-12-16 at 12:41 +0100, Jean-Marc Lasgouttes wrote: > > "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes: > > Martin> The really intended patch attached (curse Evo for not > Martin> displaying outgoing attachments!) > > It looks much better. LyXText::backspace could probably b

Re: [Patch] redrawing bugs (Re: vector considered harmful.)

2005-12-16 Thread Martin Vermeer
On Fri, 2005-12-16 at 12:41 +0100, Jean-Marc Lasgouttes wrote: > > "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes: > > Martin> The really intended patch attached (curse Evo for not > Martin> displaying outgoing attachments!) > > It looks much better. LyXText::backspace could probably b

Re: [Patch] redrawing bugs (Re: vector considered harmful.)

2005-12-16 Thread Jean-Marc Lasgouttes
> "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes: Martin> The really intended patch attached (curse Evo for not Martin> displaying outgoing attachments!) It looks much better. LyXText::backspace could probably be modifed to return true when an update is needed (or maybe set cur.needsUp

Re: [Patch] redrawing bugs (Re: vector considered harmful.)

2005-12-16 Thread Martin Vermeer
On Fri, 2005-12-16 at 11:56 +0100, Jean-Marc Lasgouttes wrote: > > "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes: > > Martin> I remember seeing this too. Attached a patch for two places > Martin> where full screen updates would be reasonable but are not > Martin> being done. The text3

Re: [Patch] redrawing bugs (Re: vector considered harmful.)

2005-12-16 Thread Jean-Marc Lasgouttes
> "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes: Martin> I remember seeing this too. Attached a patch for two places Martin> where full screen updates would be reasonable but are not Martin> being done. The text3 one probably addresses Andre's problem. Could you elaborate on why these

[Patch] redrawing bugs (Re: vector considered harmful.)

2005-12-16 Thread Martin Vermeer
On Wed, 2005-12-14 at 17:06 +0100, Jean-Marc Lasgouttes wrote: > > "Andre" == Andre Poenitz <[EMAIL PROTECTED]> writes: > > Andre> Btw, I noticed an unrelated redrawing bug (unchanged by this > Andre> patch): > > Andre> New doc a a a a a a > Andre> > Andre> > > Andre> The lower paragra

Re: vector considered harmful.

2005-12-14 Thread Jean-Marc Lasgouttes
> "Andre" == Andre Poenitz <[EMAIL PROTECTED]> writes: Andre> Btw, I noticed an unrelated redrawing bug (unchanged by this Andre> patch): Andre> New doc a a a a a a Andre> Andre> Andre> The lower paragraphs do not get redrawn correctly. I cannot reproduce this. Did someone else succee

Re: vector considered harmful.

2005-12-12 Thread Georg Baum
Jean-Marc Lasgouttes wrote: > What I do not understand is why we use std::swap. Is that some clever > C++ idiom? For example SwitchBetweenLayouts does > > InsetText in; > std::swap(in.paragraphs(), pars); > > // layouts > ParIterator end = par_iterator_end(in); > for (ParIterator it = par_iterat

Re: vector considered harmful.

2005-12-12 Thread Martin Vermeer
On Mon, 2005-12-12 at 14:57 +0100, Jean-Marc Lasgouttes wrote: ... > What I do not understand is why we use std::swap. Is that some clever > C++ idiom? For example SwitchBetweenLayouts does > > InsetText in; > std::swap(in.paragraphs(), pars); > > // layouts > ParIterato

Re: vector considered harmful.

2005-12-12 Thread Jean-Marc Lasgouttes
> "Andre" == Andre Poenitz <[EMAIL PROTECTED]> writes: Andre> This is supposed to handle directly the case of insertion of a Andre> single paragraph far from the end of the document. Andre> While I cannot see anything getting worse, the par id still go Andre> up quickly. More precisely, the i

Re: vector considered harmful.

2005-12-11 Thread Andre Poenitz
On Fri, Dec 09, 2005 at 11:15:50PM +0100, Jean-Marc Lasgouttes wrote: > > "Andre" == Andre Poenitz <[EMAIL PROTECTED]> writes: > > Andre> Would it help if I came up with a ParagraphList implementation > Andre> wrapping a vector that avoids that problem? > > Yes, I think so. First shot attach

Re: vector considered harmful.

2005-12-09 Thread Jean-Marc Lasgouttes
> "Andre" == Andre Poenitz <[EMAIL PROTECTED]> writes: Andre> Would it help if I came up with a ParagraphList implementation Andre> wrapping a vector that avoids that problem? Yes, I think so. JMarc

Re: vector considered harmful.

2005-12-09 Thread Angus Leeming
Andre Poenitz wrote: >> Anyway, the paragraph id debate is secondary. The fact is, every time >> one creates a paragraph at the beginning of a document, the whole >> document is cloned/deleted. > Would it help if I came up with a ParagraphList implementation wrapping > a vector that avoids that pr

Re: vector considered harmful.

2005-12-09 Thread Andre Poenitz
On Mon, Dec 05, 2005 at 10:42:39AM +0100, Jean-Marc Lasgouttes wrote: > > "Andre" == Andre Poenitz <[EMAIL PROTECTED]> writes: > > >> That would make Bookmarks pretty useless as soon as you add/remove > >> a paragraph. The same would hold for the error list. > > Andre> Bookmarks could be imp

Re: vector considered harmful.

2005-12-06 Thread Jean-Marc Lasgouttes
> "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes: Lars> Yes. So in 1.5 we are not going to make changes in the core Lars> structure, but we can (and should) see if we can use better Lars> suited containers. Sure. JMarc

Re: vector considered harmful.

2005-12-06 Thread Lars Gullik Bjønnes
Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes: | > "Andre" == Andre Poenitz <[EMAIL PROTECTED]> writes: | | >> That would make Bookmarks pretty useless as soon as you add/remove | >> a paragraph. The same would hold for the error list. | | Andre> Bookmarks could be implemented by real ins

Re: vector considered harmful.

2005-12-05 Thread Jean-Marc Lasgouttes
> "Andre" == Andre Poenitz <[EMAIL PROTECTED]> writes: >> That would make Bookmarks pretty useless as soon as you add/remove >> a paragraph. The same would hold for the error list. Andre> Bookmarks could be implemented by real insets. Same for errors. Anyway, the paragraph id debate is seco

Re: vector considered harmful.

2005-12-04 Thread Lars Gullik Bjønnes
Andre Poenitz <[EMAIL PROTECTED]> writes: | On Mon, Nov 28, 2005 at 10:41:25AM +0100, Jean-Marc Lasgouttes wrote: | > > "Andre" == Andre Poenitz <[EMAIL PROTECTED]> writes: | > | > Andre> I think paragraph ids are an anachrnism. We have stable(!) doc | > Andre> iterators nowadays, so position

Re: vector considered harmful.

2005-12-02 Thread Alfredo Braunstein
Andre Poenitz wrote: > On Mon, Nov 28, 2005 at 10:41:25AM +0100, Jean-Marc Lasgouttes wrote: >> > "Andre" == Andre Poenitz >> > <[EMAIL PROTECTED]> >> > writes: >> >> Andre> I think paragraph ids are an anachrnism. We have stable(!) doc >> Andre> iterators nowadays, so positions could

Re: vector considered harmful.

2005-12-02 Thread Andre Poenitz
On Mon, Nov 28, 2005 at 10:41:25AM +0100, Jean-Marc Lasgouttes wrote: > > "Andre" == Andre Poenitz <[EMAIL PROTECTED]> writes: > > Andre> I think paragraph ids are an anachrnism. We have stable(!) doc > Andre> iterators nowadays, so positions could be indicated by those. > > That would make B

Re: vector considered harmful.

2005-11-28 Thread Jean-Marc Lasgouttes
> "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes: Lars> Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes: | Lars> Now, in Document>Settings, change the textclass to article. This Lars> gives | 3 errors, since the chapter headings have been changed Lars> to Standard. | But the error li

Re: vector considered harmful.

2005-11-28 Thread Jean-Marc Lasgouttes
> "Andre" == Andre Poenitz <[EMAIL PROTECTED]> writes: Andre> I think paragraph ids are an anachrnism. We have stable(!) doc Andre> iterators nowadays, so positions could be indicated by those. That would make Bookmarks pretty useless as soon as you add/remove a paragraph. The same would hold

Re: vector considered harmful.

2005-11-27 Thread Andre Poenitz
On Fri, Nov 25, 2005 at 03:51:28PM +0100, Jean-Marc Lasgouttes wrote: > > I think the change of container from list to vector for ParagraphList > is putting us in a bad situation. Remember the weird bug I had to > solve with DEPM a few weeks ago: everytime you insert a paragraph in a > document, a

Re: vector considered harmful.

2005-11-25 Thread Martin Vermeer
On Fri, Nov 25, 2005 at 03:51:28PM +0100, Jean-Marc Lasgouttes wrote: > > I think the change of container from list to vector for ParagraphList > is putting us in a bad situation. Remember the weird bug I had to > solve with DEPM a few weeks ago: everytime you insert a paragraph in a > document, a

Re: vector considered harmful.

2005-11-25 Thread Lars Gullik Bjønnes
Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes: | Now, in Document>Settings, change the textclass to article. This gives | 3 errors, since the chapter headings have been changed to Standard. | But the error list does not work: it searches for id 994 (which was | 266 before switching class: docume

vector considered harmful.

2005-11-25 Thread Jean-Marc Lasgouttes
I think the change of container from list to vector for ParagraphList is putting us in a bad situation. Remember the weird bug I had to solve with DEPM a few weeks ago: everytime you insert a paragraph in a document, all subsequent paragraphs are cloned and deleted because they have to move. But