break;
}
case LFUN_MATH_VALIGN:
- if (mathcursor) {
+ if (mathcursor && mathcursor->formula()->getType() != LM_OT_SIMPLE) {
char align = mathcursor->valign();
if (align == '\0') {
disable = true;
break;
case LFUN_MATH_HALIGN:
- if (mathcursor) {
+ if (mathcursor && mathcursor->formula()->getType() != LM_OT_SIMPLE) {
char align = mathcursor->halign();
if (align == '\0') {
disable = true;
case LFUN_MATH_ROW_DELETE:
case LFUN_MATH_COLUMN_INSERT:
case LFUN_MATH_COLUMN_DELETE:
- disable = !mathcursor || !mathcursor->halign();
+ disable = !mathcursor || !mathcursor->halign() ||
+ mathcursor->formula()->getType() == LM_OT_SIMPLE;
break;
default:
// Of course we should only do the resize and the textcache.clear
// if values really changed...but not very important right now. (Lgb)
// All visible buffers will need resize
- owner->resize();
+ owner->view()->resize();
// We also need to empty the textcache so that
// the buffer will be formatted correctly after
// a zoom change.