]> git.lyx.org Git - lyx.git/blobdiff - src/Text2.cpp
Bring window to front after loading a document
[lyx.git] / src / Text2.cpp
index fb6bd70f32fce5c92933b80cea63ff6c2419669b..c3d696e7e2ffcca53c5e71acc82fc0c13c112ed6 100644 (file)
@@ -614,6 +614,7 @@ bool Text::checkAndActivateInset(Cursor & cur, bool front)
        if (!front)
                --cur.pos();
        inset->edit(cur, front);
+       cur.setCurrentFont();
        return true;
 }
 
@@ -632,6 +633,7 @@ bool Text::checkAndActivateInsetVisual(Cursor & cur, bool movingForward, bool mo
                return false;
        inset->edit(cur, movingForward, 
                movingLeft ? Inset::ENTRY_DIRECTION_RIGHT : Inset::ENTRY_DIRECTION_LEFT);
+       cur.setCurrentFont();
        return true;
 }
 
@@ -904,7 +906,7 @@ bool Text::deleteEmptyParagraphMechanism(Cursor & cur,
                               min(old.pit() + 1, old.lastpit()));
                ParagraphList & plist = old.text()->paragraphs();
                bool const soa = oldpar.params().startOfAppendix();
-               plist.erase(next(plist.begin(), old.pit()));
+               plist.erase(lyx::next(plist.begin(), old.pit()));
                // do not lose start of appendix marker (bug 4212)
                if (soa && old.pit() < pit_type(plist.size()))
                        plist[old.pit()].params().startOfAppendix(true);
@@ -968,7 +970,7 @@ void Text::deleteEmptyParagraphMechanism(pit_type first, pit_type last, bool tra
                        continue;
 
                if (par.empty() || (par.size() == 1 && par.isLineSeparator(0))) {
-                       pars_.erase(next(pars_.begin(), pit));
+                       pars_.erase(lyx::next(pars_.begin(), pit));
                        --pit;
                        --last;
                        continue;