]> git.lyx.org Git - lyx.git/commitdiff
gross hack to set layout
authorLars Gullik Bjønnes <larsbj@gullik.org>
Mon, 4 Mar 2002 16:10:47 +0000 (16:10 +0000)
committerLars Gullik Bjønnes <larsbj@gullik.org>
Mon, 4 Mar 2002 16:10:47 +0000 (16:10 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3659 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/ChangeLog
src/insets/insettext.C

index 4ed2270947eeb9a2400e171b1d29196cef797ed2..2f11c195a73e96a74833294a852fc8e742fcb308 100644 (file)
@@ -1,3 +1,8 @@
+2002-03-04  Lars Gullik Bjønnes  <larsbj@birdstep.com>
+
+       * insettext.C (clear): a gross hack to set layout on a newly
+       created paragraph.
+
 2002-03-04  Juergen Vigna  <jug@sad.it>
 
        * insettabular.C (localDispatch): inserted handling of
index db840f6b13bdf77d35a13b3f54b43cfd10789810..c1322162454ac6d4bdcbad219d04e1b029df3b44 100644 (file)
@@ -218,12 +218,17 @@ InsetText::~InsetText()
 
 void InsetText::clear()
 {
+       // This is a gross hack...
+       string old_layout = par->layout();
+       
        while (par) {
                Paragraph * tmp = par->next();
                delete par;
                par = tmp;
        }
        par = new Paragraph;
+       par->layout(old_layout);
+       
        reinitLyXText();
        need_update = INIT;
 }
@@ -231,7 +236,7 @@ void InsetText::clear()
 
 Inset * InsetText::clone(Buffer const &, bool same_id) const
 {
-       return  new InsetText(*this, same_id);
+       return new InsetText(*this, same_id);
 }