X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FInsetMathNest.cpp;h=0a7810784acb6520c0380ce029f6ef7a23588263;hb=b5049e769bba3923cf8e21c980c75b7c00187420;hp=2b23fb15acb9b31f3e54746894e071c34c7cc411;hpb=c2befc2b1e9961ad75d799b05c9fb201a73675a5;p=features.git diff --git a/src/mathed/InsetMathNest.cpp b/src/mathed/InsetMathNest.cpp index 2b23fb15ac..0a7810784a 100644 --- a/src/mathed/InsetMathNest.cpp +++ b/src/mathed/InsetMathNest.cpp @@ -48,7 +48,7 @@ #include "Encoding.h" #include "FuncRequest.h" #include "FuncStatus.h" -#include "LyXFunc.h" +#include "LyX.h" #include "LyXRC.h" #include "OutputParams.h" #include "Text.h" @@ -173,6 +173,14 @@ void InsetMathNest::metrics(MetricsInfo const & mi) const } +void InsetMathNest::updateLabels(ParIterator const & it, UpdateType utype) +{ + for (idx_type i = 0, n = nargs(); i != n; ++i) + cell(i).updateLabels(it, utype); +} + + + bool InsetMathNest::idxNext(Cursor & cur) const { LASSERT(&cur.inset() == this, /**/); @@ -530,7 +538,7 @@ void InsetMathNest::handleFont2(Cursor & cur, docstring const & arg) void InsetMathNest::doDispatch(Cursor & cur, FuncRequest & cmd) { - //lyxerr << "InsetMathNest: request: " << cmd << endl; + //LYXERR0("InsetMathNest: request: " << cmd); Parse::flags parseflg = Parse::QUIET | Parse::USETEXT; @@ -556,6 +564,8 @@ void InsetMathNest::doDispatch(Cursor & cur, FuncRequest & cmd) } cur.niceInsert(topaste, parseflg, false); cur.clearSelection(); // bug 393 + // FIXME audit setBuffer/updateLabels calls + cur.buffer()->updateLabels(); cur.finishUndo(); break; } @@ -567,6 +577,8 @@ void InsetMathNest::doDispatch(Cursor & cur, FuncRequest & cmd) // Prevent stale position >= size crash // Probably not necessary anymore, see eraseSelection (gb 2005-10-09) cur.normalize(); + // FIXME audit setBuffer/updateLabels calls + cur.buffer()->updateLabels(); break; case LFUN_COPY: @@ -976,6 +988,8 @@ void InsetMathNest::doDispatch(Cursor & cur, FuncRequest & cmd) cur.posBackward(); cur.pushBackward(*cur.nextInset()); cur.niceInsert(save_selection); + // FIXME audit setBuffer/updateLabels calls + cur.buffer()->updateLabels(); #else if (currentMode() == Inset::TEXT_MODE) { cur.recordUndoSelection(); @@ -992,7 +1006,7 @@ void InsetMathNest::doDispatch(Cursor & cur, FuncRequest & cmd) case LFUN_REGEXP_MODE: { InsetMathHull * i = dynamic_cast(cur.inset().asInsetMath()); if (i && i->getType() == hullRegexp) { - cur.message(_("Already in regexp mode")); + cur.message(_("Already in regular expression mode")); break; } cur.macroModeClose(); @@ -1002,7 +1016,7 @@ void InsetMathNest::doDispatch(Cursor & cur, FuncRequest & cmd) cur.posBackward(); cur.pushBackward(*cur.nextInset()); cur.niceInsert(save_selection); - cur.message(_("Regexp editor mode")); + cur.message(_("Regular expression editor mode")); break; } @@ -1190,6 +1204,8 @@ void InsetMathNest::doDispatch(Cursor & cur, FuncRequest & cmd) if (createInsetMath_fromDialogStr(cmd.argument(), ar)) { cur.recordUndoSelection(); cur.insert(ar); + // FIXME audit setBuffer/updateLabels calls + cur.buffer()->updateLabels(); } else cur.undispatched(); break; @@ -1250,11 +1266,11 @@ bool InsetMathNest::getStatus(Cursor & cur, FuncRequest const & cmd, bool ret = true; string const arg = to_utf8(cmd.argument()); switch (cmd.action) { - case LFUN_TABULAR_FEATURE: + case LFUN_INSET_MODIFY: flag.setEnabled(false); break; #if 0 - case LFUN_TABULAR_FEATURE: + case LFUN_INSET_MODIFY: // FIXME: check temporarily disabled // valign code char align = mathcursor::valign();