]> git.lyx.org Git - lyx.git/blobdiff - src/Text.cpp
- UI support for the LaTeX-package undertilde, fileformat change, fixed the remaining...
[lyx.git] / src / Text.cpp
index 7c6fa5a233973a55b46e88d29cd1b0cae9840525..8996a795d1af67c9fc36790ab247c9b77112d3d1 100644 (file)
@@ -356,7 +356,6 @@ void Text::readParToken(Paragraph & par, Lexer & lex,
                // of this document. For example, when you apply class article to a beamer document,
                // all unknown layouts such as frame will be added to document class article so that
                // these layouts can keep their original names.
-               tclass.addLayoutIfNeeded(layoutname);
                bool const added_one = tclass.addLayoutIfNeeded(layoutname);
                if (added_one) {
                        // Warn the user.
@@ -1250,7 +1249,11 @@ void Text::acceptOrRejectChanges(Cursor & cur, ChangeOp op)
 
                pos_type left  = (pit == begPit ? begPos : 0);
                pos_type right = (pit == endPit ? endPos : parSize);
-
+               
+               if (left == right)
+                       // there is no change here
+                       continue;
+               
                if (op == ACCEPT) {
                        pars_[pit].acceptChanges(left, right);
                } else {