[No patch] Undo

2005-02-27 Thread Kornelia Poenitz
but a recipe to fix the 'funny' undo behaviour in tabeles and multi-cell math: in undo.C line 76 replace && stack.top().cell.size() == undo.cell.size() by && stack.top().cell == undo.cell and implement the needed bool operator==(StableDocIterator const &, StableDocIterator const &); (p

Re: [patch] undo

2004-12-06 Thread Alfredo Braunstein
Andre Poenitz wrote: >> Cool! now we have a developer with even a development machine! That seems >> an explosive combination ;-) > > Not excatly. I stopped the checkout after 1:15h over the 56k line. If I burn a cdrom with an updated tree and ship it from South America, would it arrive sooner?

Re: [patch] undo

2004-12-06 Thread Andre Poenitz
On Mon, Dec 06, 2004 at 02:47:19PM +0100, Alfredo Braunstein wrote: > Andre Poenitz wrote: > > > On Sun, Dec 05, 2004 at 08:27:00PM +0100, Alfredo Braunstein wrote: > >> This patch solves two crashes with undo, and simplifies a bit undo.cursor > >> handling in textUndoOrRedo. > > > > Whohey. And

Re: [patch] undo

2004-12-06 Thread Alfredo Braunstein
Andre Poenitz wrote: > On Sun, Dec 05, 2004 at 08:27:00PM +0100, Alfredo Braunstein wrote: >> This patch solves two crashes with undo, and simplifies a bit undo.cursor >> handling in textUndoOrRedo. > > Whohey. And I just started a fresh checkout on my shining PII/333... > But now that xforms wor

Re: [patch] undo

2004-12-06 Thread Andre Poenitz
On Sun, Dec 05, 2004 at 08:27:00PM +0100, Alfredo Braunstein wrote: > This patch solves two crashes with undo, and simplifies a bit undo.cursor > handling in textUndoOrRedo. Whohey. And I just started a fresh checkout on my shining PII/333... But now that xforms works again it might even fall into

[patch] undo

2004-12-05 Thread Alfredo Braunstein
This patch solves two crashes with undo, and simplifies a bit undo.cursor handling in textUndoOrRedo. One of the crashes is due to copying paragraphs without setting their inset_owner to the correct inset. This backpointerage should surely die, but until then setting it is certainly needed. The s

Re: [patch] undo final

2004-03-08 Thread Angus Leeming
Andre Poenitz wrote: > > This is a slight rework of undo to use 'StableDocumentIterator' as a > base. > > Seems to work even within mathed, so this is already an improvemnt > over 1.3 where the cursor had to leave mathed on undo. > > Andre' Any chance of a 'diff -u' diff? -- Angus

[patch] undo final

2004-03-08 Thread Andre Poenitz
This is a slight rework of undo to use 'StableDocumentIterator' as a base. Seems to work even within mathed, so this is already an improvemnt over 1.3 where the cursor had to leave mathed on undo. Andre' 1.diff.gz Description: application/gunzip

[patch] undo...

2003-06-05 Thread Andre Poenitz
And incidently, I just found one of the 'off by some' [;-}] error when having a look at setLayout()'s undo... Note that there is quite some potential to remove code in text2.C along the lines of: - ParagraphList::iterator endpit = boost::next(send_cur.par()); - ParagraphLi

Re: [patch[ undo

2003-06-05 Thread Andre Poenitz
On Thu, Jun 05, 2003 at 02:05:38PM +0200, Jean-Marc Lasgouttes wrote: > > "Andre" == Andre Poenitz <[EMAIL PROTECTED]> writes: > > Andre> The current implementation stores only full outer level > Andre> paragraphs, so this is more expensive than the previous > Andre> solution. This matters for

Re: [patch[ undo

2003-06-05 Thread Jean-Marc Lasgouttes
> "Andre" == Andre Poenitz <[EMAIL PROTECTED]> writes: Andre> The current implementation stores only full outer level Andre> paragraphs, so this is more expensive than the previous Andre> solution. This matters for large tables etc. Do you have a plan for restoring this capability? I think it

Re: [patch[ undo

2003-06-05 Thread Andre Poenitz
On Thu, Jun 05, 2003 at 12:38:07PM +0200, Lars Gullik Bjønnes wrote: > | I had a look at it last night. It is a bit outdated, but the ideas fit > | nicely in the two stage drawing system. So a plan could be as follows: > > Before we do any of this, we should try to get Undo into "perfect" > stat

Re: [patch[ undo

2003-06-05 Thread Lars Gullik Bjønnes
Andre Poenitz <[EMAIL PROTECTED]> writes: | On Wed, Jun 04, 2003 at 07:37:06PM +0200, Lars Gullik Bjønnes wrote: | > | I don't understand the rebreaking point. Do you mean breaking a par into | > | two or some re-calculation of which part of a par belongs to which row? | > | If the latter, I think

Re: [patch[ undo

2003-06-05 Thread Andre Poenitz
On Thu, Jun 05, 2003 at 10:25:39AM +0200, Juergen Vigna wrote: > >But the contained InsetTexts do, so I am not spanking 'slow InsetTabular as > >created by Juergen' but 'InsetTabular as container of lots InsetTexts' > >[Although I'd think that there is some unnecessary fat in InsetTabular, > >too..

Re: [patch[ undo

2003-06-05 Thread Juergen Vigna
Andre Poenitz wrote: But the contained InsetTexts do, so I am not spanking 'slow InsetTabular as created by Juergen' but 'InsetTabular as container of lots InsetTexts' [Although I'd think that there is some unnecessary fat in InsetTabular, too...] You may have a point here, althought I don't know

Re: [patch[ undo

2003-06-05 Thread Andre Poenitz
On Thu, Jun 05, 2003 at 09:03:16AM +0200, Juergen Vigna wrote: > Andre Poenitz wrote: > >This 'when needed' is basically the time between first and second drawing > >phase. We need the rebreak to figure out the height of the InsetText, > >so it is needed in the metrics() phase. And once we've done

Re: [patch[ undo

2003-06-05 Thread Andre Poenitz
On Wed, Jun 04, 2003 at 07:37:06PM +0200, Lars Gullik Bjønnes wrote: > | I don't understand the rebreaking point. Do you mean breaking a par into > | two or some re-calculation of which part of a par belongs to which row? > | If the latter, I think the solution is consequent two-phase drawing with

Re: [patch[ undo

2003-06-05 Thread Juergen Vigna
Andre Poenitz wrote: This 'when needed' is basically the time between first and second drawing phase. We need the rebreak to figure out the height of the InsetText, so it is needed in the metrics() phase. And once we've done it there there is no reason not to save the results up to the next draw()

Re: [patch[ undo

2003-06-05 Thread Angus Leeming
Andre Poenitz wrote: > "More than one lyxview" would need some generic solution as e.g. mathed > can't cope with that anyway (and I doubt graphics will - or anything > caching a bv_ privately for that matter). That's solidly a few years in > the future, if at all... The graphics loading stuff does

Re: [patch[ undo

2003-06-05 Thread Andre Poenitz
On Wed, Jun 04, 2003 at 07:37:06PM +0200, Lars Gullik Bjønnes wrote: > One other idea when I read through the lazy_lyxtext doc, is to never > cache the lyx rows at all, but always generate them when needed. That > might however be too slow... I don't know. This 'when needed' is basically the time

Re: [patch[ undo

2003-06-05 Thread Lars Gullik Bjønnes
Andre Poenitz <[EMAIL PROTECTED]> writes: | On Wed, Jun 04, 2003 at 05:23:06PM +0200, Lars Gullik Bjønnes wrote: | > | Wouldn't it be much simpler if each Paragraph contained only its own part | > | of the RowList (sort of 'drawing cache') and is completely ignorant of the | > | others? Paragraphs

Re: [patch[ undo

2003-06-05 Thread John Levon
On Wed, Jun 04, 2003 at 06:12:00PM +0200, Andre Poenitz wrote: > caching a bv_ privately for that matter). That's solidly a few years in > the future, if at all... Yep ! Note that per-paragraph rowlists is actually not very far away from InsetParagraph regards john

Re: [patch[ undo

2003-06-05 Thread Andre Poenitz
On Wed, Jun 04, 2003 at 05:23:06PM +0200, Lars Gullik Bjønnes wrote: > | Wouldn't it be much simpler if each Paragraph contained only its own part > | of the RowList (sort of 'drawing cache') and is completely ignorant of the > | others? Paragraphs should contain an integer number of full rows, sho

Re: [patch[ undo

2003-06-05 Thread Lars Gullik Bjønnes
Andre Poenitz <[EMAIL PROTECTED]> writes: | On Wed, Jun 04, 2003 at 05:08:24PM +0200, Andre' Poenitz wrote: | > This fixes part of the cursor positioning after undo. | > It even seems to work sometimes in insets. | | And here's the patch... go for it. -- Lgb

Re: [patch[ undo

2003-06-05 Thread Lars Gullik Bjønnes
Andre Poenitz <[EMAIL PROTECTED]> writes: | This fixes part of the cursor positioning after undo. | It even seems to work sometimes in insets. | | It still crashes at a pretty high rate, most often in redoParagraphs(). | | --- | | I really wonder what this function is good for anyway. | | Can

Re: [patch[ undo

2003-06-05 Thread Andre Poenitz
On Wed, Jun 04, 2003 at 05:08:24PM +0200, Andre' Poenitz wrote: > This fixes part of the cursor positioning after undo. > It even seems to work sometimes in insets. And here's the patch... Index: bufferview_funcs.C === RCS file: /usr

[patch[ undo

2003-06-05 Thread Andre Poenitz
This fixes part of the cursor positioning after undo. It even seems to work sometimes in insets. It still crashes at a pretty high rate, most often in redoParagraphs(). --- I really wonder what this function is good for anyway. Can anybody explain me in simple words the relationship between Pa

Re: [patch] undo/redo

2003-06-04 Thread Andre Poenitz
On Wed, Jun 04, 2003 at 01:55:01PM +0200, Lars Gullik Bjønnes wrote: > No... (well yes... but) > > I'd like all the NO_STD_LIST stuff to be removed in a patch of its own > first. I'll do that if you like. Would be kind. Andre' -- Those who desire to give up Freedom in order to gain Security,

Re: [patch] undo/redo

2003-06-04 Thread Lars Gullik Bjønnes
Andre Poenitz <[EMAIL PROTECTED]> writes: | This brings back undo (and redo...) to a somewhat working state. | | The most prominent flaw is that the cursor is placed at the beginning | of the first paragraph touched by the undo in the main paragraph list. | | This means undo currently leaves all

[patch] undo/redo

2003-06-04 Thread Andre Poenitz
This brings back undo (and redo...) to a somewhat working state. The most prominent flaw is that the cursor is placed at the beginning of the first paragraph touched by the undo in the main paragraph list. This means undo currently leaves all minipages/tabulars/whatever [Pretty much the same sit

Re: [patch] undo (partial...)

2003-06-04 Thread Lars Gullik Bjønnes
Andre Poenitz <[EMAIL PROTECTED]> writes: | This makes undo partially work. It crashes always when used in the last | par and after "complicated" operations, but it works if used in the middle | of the text for simple insertions/deletions, sometimes even multi-par | stuff. | | In any case, this

[patch] undo (partial...)

2003-06-04 Thread Andre Poenitz
This makes undo partially work. It crashes always when used in the last par and after "complicated" operations, but it works if used in the middle of the text for simple insertions/deletions, sometimes even multi-par stuff. In any case, this is somewhat beter than what we have now. Note that I

Re: [PATCH] undo stack second try

2002-05-26 Thread Lars Gullik Bjønnes
John Levon <[EMAIL PROTECTED]> writes: | OK this kills the Undo * thing in favour of boost::shared_ptr. It's | valgrind clean, and seems to work fine for me. Getting undo_funcs.C into | readable shape is a job for another day. > | I've not included boring parts of the patch like removal of undost

Re: [PATCH] undo stack second try

2002-05-26 Thread John Levon
On Sun, May 26, 2002 at 08:01:35PM +0100, John Levon wrote: > OK this kills the Undo * thing in favour of boost::shared_ptr. It's Sorry, let me provide a more detailed summary : 1. Remove !DELETE_UNUSED_PARAGRAPHS code 2. remove UndoStack in favour of a template 3. use shared_ptr for managing U

[PATCH] undo stack second try

2002-05-26 Thread John Levon
OK this kills the Undo * thing in favour of boost::shared_ptr. It's valgrind clean, and seems to work fine for me. Getting undo_funcs.C into readable shape is a job for another day. I've not included boring parts of the patch like removal of undostack files OK to apply ? thanks john -- "Time