]> git.lyx.org Git - features.git/commitdiff
* Only enter inset which return true on isActive(). This is the behavior in the curso...
authorStefan Schimanski <sts@lyx.org>
Mon, 11 Jun 2007 18:26:42 +0000 (18:26 +0000)
committerStefan Schimanski <sts@lyx.org>
Mon, 11 Jun 2007 18:26:42 +0000 (18:26 +0000)
  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
src/mathed/InsetMathNest.cpp

index bc7b839dd7162dea014f9623318f911135ca2b68..28d46bce94736b0c7985d5981a3ae189706217b3 100644 (file)
@@ -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<Inset> doClone() const;
 
index cb34d49db1532b2c67c5ab4f85c0abac59ace2f7..c4ebba132bd09f0f52047b76f1bd4e2aa9174392 100644 (file)
@@ -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());
                        }