Alfredo Braunstein wrote:
Alfredo Braunstein wrote:

The problem has nothing to do with env depths, just with cut/past of empty
paragraphs. The problem is that Text::acceptChanges on the internal
cut/paste paragraph list calls DEPM and this removes an empty paragraph at
the beginning.

The fix is to move the bulk of acceptChanges to paragraph_funcs (where it
belongs IMO) and the version in Text just calls that and then DEPM, while
in cap we just call the plain version.

... and the patch.

I think this is the right thing to do, but on a first test this uncovers a
DEPM bug :-O ...

Seems DEPM was not called after insertion, the following change to
pasteParagraphList (included in the patch) seems to fix it:

-               text->setCursor(cur.top(), ppp.first, ppp.second);
+               text->setCursor(cur, ppp.first, ppp.second);

Looks good Alfredo but one question: why don't you just move deleteEmptyParagraphMechanism() to paragraph_funcs as well? Same thing for Text::fixCursorAfterDelete(), this has nothing to do with Text AFAIS...

Abdel.

Reply via email to