]> git.lyx.org Git - lyx.git/blobdiff - src/bufferview_funcs.C
Fixed cut&paste bugs and added freespacing for ERT Insets.
[lyx.git] / src / bufferview_funcs.C
index 7239dbd0e268ba547154d8a0289a0b2a22445b62..87d2a294867d4fcd470f9e8c97479d3d6a4f7a6e 100644 (file)
@@ -19,7 +19,7 @@
 #include "BufferView.h"
 #include "paragraph.h"
 #include "lyxfont.h"
-#include "lyx_gui_misc.h"
+#include "frontends/Alert.h"
 #include "lyxtext.h"
 #include "buffer.h"
 #include "support/lstrings.h"
@@ -68,7 +68,7 @@ void lang(BufferView * bv, string const & l)
                font.setLanguage(lang);
                toggleAndShow(bv, font);
        } else
-               WriteAlert(_("Error! unknown language"),l);
+               Alert::alert(_("Error! unknown language"),l);
 }
 
 
@@ -120,7 +120,11 @@ void roman(BufferView * bv)
 
 void styleReset(BufferView * bv)
 {
+#ifndef INHERIT_LANG
+       LyXFont font(LyXFont::ALL_INHERIT, ignore_language);
+#else 
        LyXFont font(LyXFont::ALL_INHERIT);
+#endif
        toggleAndShow(bv, font);
 }
 
@@ -222,8 +226,7 @@ void toggleAndShow(BufferView * bv, LyXFont const & font, bool toggleall)
                bv->update(text, BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE);
 
                if (font.language() != ignore_language ||
-                   font.number() != LyXFont::IGNORE)
-               {
+                   font.number() != LyXFont::IGNORE) {
                        LyXCursor & cursor = text->cursor;
                        text->computeBidiTables(bv->buffer(), cursor.row());
                        if (cursor.boundary() !=