On Tue, Feb 19, 2002 at 12:39:00AM +0100, Lars Gullik Bjønnes wrote:
 
> on it...
> 
> -- 
>       Lgb

Why in CutAndPaste.C, in the conditional at line 229:

            if (!buf->next()) {

in the first branch there is no operation SwitchLayoutsBetweenClasses?

This is where it goes wrong. If I cut not just the float, but also the
paragraph after it (so that buf->next is true) then the layout map
conversion takes place. 

BTW the blue underline that Michael reported is due to inserting a
German paragraph into a default language article ;-)

Fix for bug 211 attached ;-) Haven't tested very thoroughly for side
effects.

I don't think there is so terribly much wrong structurally, although 
using strings for layout names may be a good idea anyway.

Martin




Index: CutAndPaste.C
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/CutAndPaste.C,v
retrieving revision 1.46
diff -u -b -B -p -r1.46 CutAndPaste.C
--- CutAndPaste.C       2002/01/17 10:54:30     1.46
+++ CutAndPaste.C       2002/02/19 13:26:50
@@ -225,6 +225,8 @@ bool CutAndPaste::pasteSelection(Paragra
        
        // There are two cases: cutbuffer only one paragraph or many
        if (!buf->next()) {
+               SwitchLayoutsBetweenClasses(textclass, tc, buf,
+                                           current_view->buffer()->params);
                // only within a paragraph
                Paragraph * tmpbuf = new Paragraph(*buf, false);
                

Attachment: msg33191/pgp00000.pgp
Description: PGP signature

Reply via email to