}
+// FIXME: InsetMathGrid should be changed to let the real column alignment be
+// given by a virtual method like displayColAlign, because the values produced
+// by defaultColAlign can be invalidated by lfuns such as add-column. I suspect
+// that for the moment the values produced by defaultColAlign are not used,
+// notably because alignment is not implemented in the LyXHTML output.
char InsetMathSplit::defaultColAlign(col_type col)
{
- if (name_ == "split")
- return 'l';
if (name_ == "gathered")
return 'c';
- if (name_ == "aligned" || name_ == "align")
- return (col & 1) ? 'l' : 'r';
- if (name_ == "alignedat")
- return (col & 1) ? 'l' : 'r';
+ if (name_ == "lgathered")
+ return 'l';
+ if (name_ == "rgathered")
+ return 'r';
+ if (name_ == "split"
+ || name_ == "aligned"
+ || name_ == "align"
+ || name_ == "alignedat")
+ return colAlign(hullAlign, col);
return 'l';
}
+char InsetMathSplit::displayColAlign(idx_type idx) const
+{
+ if (name_ == "gathered")
+ return 'c';
+ if (name_ == "lgathered")
+ return 'l';
+ if (name_ == "rgathered")
+ return 'r';
+ if (name_ == "split"
+ || name_ == "aligned"
+ || name_ == "align"
+ || name_ == "alignedat")
+ return colAlign(hullAlign, col(idx));
+ return InsetMathGrid::displayColAlign(idx);
+}
+
+
void InsetMathSplit::draw(PainterInfo & pi, int x, int y) const
{
InsetMathGrid::draw(pi, x, y);
flag.setEnabled(false);
return true;
}
+ if (s == "align-left" || s == "align-center" || s == "align-right") {
+ flag.setEnabled(false);
+ return true;
+ }
break;
}
default: