]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_splitinset.C
Fix event loop to no longer eat CPU
[lyx.git] / src / mathed / math_splitinset.C
index 5f5af3d87a1248975a632ce5e46591060205404b..b5ccfe370605f311a41bf3d4e803579ec57f63ef 100644 (file)
@@ -55,6 +55,13 @@ char MathSplitInset::defaultColAlign(col_type col)
 }
 
 
+void MathSplitInset::draw(PainterInfo & pi, int x, int y) const
+{
+       MathGridInset::draw(pi, x, y);
+       setPosCache(pi, x, y);
+}
+
+
 bool MathSplitInset::getStatus(LCursor & cur, FuncRequest const & cmd,
                FuncStatus & flag) const
 {
@@ -81,6 +88,8 @@ void MathSplitInset::write(WriteStream & ws) const
        if (ws.fragile())
                ws << "\\protect";
        ws << "\\begin{" << name_ << '}';
+       if (name_ == "alignedat")
+               ws << '{' << static_cast<unsigned int>((ncols() + 1)/2) << '}';
        MathGridInset::write(ws);
        if (ws.fragile())
                ws << "\\protect";