]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathArray.cpp
Cmake export tests: Added sublabel handling also to revertedTests
[lyx.git] / src / mathed / InsetMathArray.cpp
index fd7ceebe31c8634089204d583bd4d1ee1bcdd985..d5f9164273f93263ec21528b2b4b406bf0468c85 100644 (file)
@@ -51,7 +51,7 @@ InsetMathArray::InsetMathArray(Buffer * buf, docstring const & name,
                istringstream ls(line);
                typedef istream_iterator<string> iter;
                vector<string> v = vector<string>(iter(ls), iter());
-               if (v.size())
+               if (!v.empty())
                        dat.push_back(v);
        }
 
@@ -103,6 +103,7 @@ void InsetMathArray::write(WriteStream & os) const
        if (os.fragile())
                os << "\\protect";
        os << "\\begin{" << name_ << '}';
+       bool open = os.startOuterRow();
 
        char const v = verticalAlignment();
        if (v == 't' || v == 'b')
@@ -114,6 +115,8 @@ void InsetMathArray::write(WriteStream & os) const
        if (os.fragile())
                os << "\\protect";
        os << "\\end{" << name_ << '}';
+       if (open)
+               os.startOuterRow();
        // adding a \n here is bad if the array is the last item
        // in an \eqnarray...
 }