]> git.lyx.org Git - lyx.git/blobdiff - src/lyxfunc.C
Move init() back to LyXView
[lyx.git] / src / lyxfunc.C
index 088828537d18d16f4e0b2df36b113e0ede41f28e..26a1b6aae34ee20166b5e8bd1e6852d7bdbe276f 100644 (file)
@@ -487,7 +487,7 @@ FuncStatus LyXFunc::getStatus(kb_action action,
                break;
        }
        case LFUN_MATH_VALIGN:
-               if (mathcursor) {
+               if (mathcursor && mathcursor->formula()->getType() != LM_OT_SIMPLE) {
                        char align = mathcursor->valign();
                        if (align == '\0') {
                                disable = true;
@@ -507,7 +507,7 @@ FuncStatus LyXFunc::getStatus(kb_action action,
                break;
 
        case LFUN_MATH_HALIGN:
-               if (mathcursor) {
+               if (mathcursor && mathcursor->formula()->getType() != LM_OT_SIMPLE) {
                        char align = mathcursor->halign();
                        if (align == '\0') {
                                disable = true;
@@ -561,7 +561,8 @@ FuncStatus LyXFunc::getStatus(kb_action action,
        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:
@@ -1613,7 +1614,7 @@ string const LyXFunc::dispatch(kb_action action, string argument)
                // 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.