]> git.lyx.org Git - lyx.git/blobdiff - src/paragraph.C
re-enable mathrm toggling with C-m (was disabled by accident)
[lyx.git] / src / paragraph.C
index 618504e9408393b0587adaa7f67358eb47dfe524..76dd07f2b548ffde3e068cead2d1c0c47f682261 100644 (file)
@@ -86,6 +86,7 @@ Paragraph::Paragraph()
        enumdepth = 0;
        itemdepth = 0;
        bibkey = 0; // ale970302
+       params().clear();
 }
 
 
@@ -106,7 +107,8 @@ Paragraph::Paragraph(Paragraph * par)
        previous_->next_ = this;
        // end
 
-       bibkey = 0; // ale970302        
+       bibkey = 0; // ale970302
+       params().clear();
 }
 
 
@@ -187,6 +189,11 @@ void Paragraph::writeFile(Buffer const * buf, ostream & os,
        }
        
        // First write the layout
+       string lay = layout();
+       if (lay.empty()) {
+               lay = textclasslist[bparams.textclass].defaultLayoutName();
+       }
+       
        os << "\n\\layout " << layout() << "\n";
        
        // Maybe some vertical spaces.
@@ -845,7 +852,7 @@ void Paragraph::breakParagraph(BufferParams const & bparams,
 {
        // create a new paragraph
        Paragraph * tmp = new Paragraph(this);
-       tmp->layout(layout());
+       tmp->layout(textclasslist[bparams.textclass].defaultLayoutName());
        
        // remember to set the inset_owner
        tmp->setInsetOwner(inInset());