]> git.lyx.org Git - lyx.git/blobdiff - src/Layout.cpp
Fix yet another thinko in the math grid paste code
[lyx.git] / src / Layout.cpp
index 7d3a1f89ff5accb4c28a32d6a25ff9a6405819c5..877464f240b74c5856525e73d03983027cf864d6 100644 (file)
@@ -607,7 +607,7 @@ bool Layout::readIgnoreForcelocal(Lexer & lex, TextClass const & tclass)
                        lex.eatLine();
                        vector<string> const req =
                                getVectorFromString(lex.getString(true));
-                       requires_.insert(req.begin(), req.end());
+                       required_.insert(req.begin(), req.end());
                        break;
                }
 
@@ -1016,6 +1016,7 @@ void Layout::readArgument(Lexer & lex)
        arg.nodelims = false;
        arg.autoinsert = false;
        arg.insertcotext = false;
+       arg.insertonnewline = false;
        bool error = false;
        bool finished = false;
        arg.font = inherit_font;
@@ -1073,7 +1074,7 @@ void Layout::readArgument(Lexer & lex)
                        arg.tooltip = lex.getDocString();
                } else if (tok == "requires") {
                        lex.next();
-                       arg.requires = lex.getString();
+                       arg.required = lex.getString();
                } else if (tok == "decoration") {
                        lex.next();
                        arg.decoration = lex.getString();
@@ -1149,8 +1150,8 @@ void writeArgument(ostream & os, string const & id, Layout::latexarg const & arg
                os << "\t\tPresetArg \"" << to_utf8(arg.presetarg) << "\"\n";
        if (!arg.tooltip.empty())
                os << "\t\tToolTip \"" << to_utf8(arg.tooltip) << "\"\n";
-       if (!arg.requires.empty())
-               os << "\t\tRequires \"" << arg.requires << "\"\n";
+       if (!arg.required.empty())
+               os << "\t\tRequires \"" << arg.required << "\"\n";
        if (!arg.decoration.empty())
                os << "\t\tDecoration \"" << arg.decoration << "\"\n";
        if (!arg.newlinecmd.empty())
@@ -1442,11 +1443,11 @@ void Layout::write(ostream & os) const
        case Spacing::Default:
                break;
        }
-       if (!requires_.empty()) {
+       if (!required_.empty()) {
                os << "\tRequires ";
-               for (set<string>::const_iterator it = requires_.begin();
-                    it != requires_.end(); ++it) {
-                       if (it != requires_.begin())
+               for (set<string>::const_iterator it = required_.begin();
+                    it != required_.end(); ++it) {
+                       if (it != required_.begin())
                                os << ',';
                        os << *it;
                }