]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetnote.C
Don't remove cell selections after fontchange.
[lyx.git] / src / insets / insetnote.C
index 476e5595b60634b065ddb035497b112b110a69be..da3c39bfd6449a9f938261ad331b4db4b86358aa 100644 (file)
@@ -17,6 +17,7 @@
 #include "insetnote.h"
 #include "gettext.h"
 #include "lyxfont.h"
+#include "language.h"
 #include "buffer.h"
 #include "BufferView.h"
 #include "lyxtext.h"
 
 using std::ostream;
 
+
 void InsetNote::init()
 {
        LyXFont font(LyXFont::ALL_SANE);
        font.decSize();
        font.setColor(LColor::note);
        setLabelFont(font);
-       setBackgroundColor(LColor::note);
+       setBackgroundColor(LColor::notebg);
        setLabel(_("note"));
        setInsetName("Note");
 }
@@ -67,7 +69,6 @@ InsetNote::InsetNote(Buffer const * buf, string const & contents,
        init();
 
        Paragraph * par = inset.paragraph();
-       Paragraph::size_type pos = 0;
        LyXFont font(LyXFont::ALL_INHERIT, buf->params.language);
 
        // Since XForms doesn't support RTL, we can assume that old notes
@@ -75,6 +76,7 @@ InsetNote::InsetNote(Buffer const * buf, string const & contents,
        if (font.language()->RightToLeft())
                font.setLanguage(default_language);
 
+       lyx::pos_type pos = 0;
        buf->insertStringAsLines(par, pos, font, strip(contents, '\n'));
 }