X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FInsetMathAMSArray.cpp;h=e615e1dff886e7cf2e997d397f73457a5300d91c;hb=704328d3488c75733ddeb9ad5439b1907e323e39;hp=b9efc3d0e2853631d2c20c98e3cf0e97312cdb60;hpb=ff4460603e3888948b46f0ab5bfa69a862d538ad;p=lyx.git diff --git a/src/mathed/InsetMathAMSArray.cpp b/src/mathed/InsetMathAMSArray.cpp index b9efc3d0e2..e615e1dff8 100644 --- a/src/mathed/InsetMathAMSArray.cpp +++ b/src/mathed/InsetMathAMSArray.cpp @@ -24,12 +24,14 @@ #include "support/lstrings.h" +#include #include -namespace lyx { +using namespace std; +using namespace lyx::support; -using support::bformat; +namespace lyx { InsetMathAMSArray::InsetMathAMSArray(Buffer * buf, docstring const & name, @@ -104,20 +106,27 @@ void InsetMathAMSArray::draw(PainterInfo & pi, int x, int y) const bool InsetMathAMSArray::getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus & flag) const { - switch (cmd.action) { - case LFUN_TABULAR_FEATURE: { - docstring const & s = cmd.argument(); + switch (cmd.action()) { + case LFUN_INSET_MODIFY: { + istringstream is(to_utf8(cmd.argument())); + string s; + is >> s; + if (s != "tabular") + break; + is >> s; if (s == "add-vline-left" || s == "add-vline-right") { flag.message(bformat( - from_utf8(N_("Can't add vertical grid lines in '%1$s'")), name_)); + from_utf8(N_("Can't add vertical grid lines in '%1$s'")), + name_)); flag.setEnabled(false); return true; } - return InsetMathGrid::getStatus(cur, cmd, flag); + break; } default: - return InsetMathGrid::getStatus(cur, cmd, flag); + break; } + return InsetMathGrid::getStatus(cur, cmd, flag); }