From b7ce285f8b6b74848b49600dad08d93ed4893568 Mon Sep 17 00:00:00 2001 From: Stefan Schimanski Date: Mon, 11 Jun 2007 18:26:42 +0000 Subject: [PATCH] * Only enter inset which return true on isActive(). This is the behavior in the cursor code. Only newly created inset were entered everytime. * Derived classes of CommandInset do not draw all cells, so return false. (fixes http://bugzilla.lyx.org/show_bug.cgi?id=3715) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18742 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/mathed/CommandInset.h | 3 +++ src/mathed/InsetMathNest.cpp | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mathed/CommandInset.h b/src/mathed/CommandInset.h index bc7b839dd7..28d46bce94 100644 --- a/src/mathed/CommandInset.h +++ b/src/mathed/CommandInset.h @@ -40,6 +40,9 @@ public: virtual docstring const screenLabel() const; /// docstring const & commandname() const { return name_; } + /// + bool isActive() const { return false; } + private: virtual std::auto_ptr doClone() const; diff --git a/src/mathed/InsetMathNest.cpp b/src/mathed/InsetMathNest.cpp index cb34d49db1..c4ebba132b 100644 --- a/src/mathed/InsetMathNest.cpp +++ b/src/mathed/InsetMathNest.cpp @@ -732,7 +732,7 @@ goto_char_backwards: && cur.inMacroMode() && cur.macroName() != "\\" && cur.macroModeClose()) { MathAtom const atom = cur.prevAtom(); - if (atom->asNestInset() && atom->nargs() > 0) { + if (atom->asNestInset() && atom->isActive()) { cur.posLeft(); cur.pushLeft(*cur.nextInset()); } -- 2.39.2