]> git.lyx.org Git - features.git/commitdiff
Proper fix for #6967 that does not reintroduce #6793
authorEnrico Forestieri <forenr@lyx.org>
Mon, 25 Oct 2010 21:36:25 +0000 (21:36 +0000)
committerEnrico Forestieri <forenr@lyx.org>
Mon, 25 Oct 2010 21:36:25 +0000 (21:36 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35841 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/InsetMathHull.cpp

index 018a71c2e98fe9bbeed4f497786cd73225b8eabd..4f63949458a44caa08e32d13f5eef57f4907d5a8 100644 (file)
@@ -141,7 +141,7 @@ docstring hullName(HullType type)
 static InsetLabel * dummy_pointer = 0;
 
 InsetMathHull::InsetMathHull(Buffer * buf)
-       : InsetMathGrid(buf, 1, 1), type_(hullNone), numbered_(1, false),
+       : InsetMathGrid(buf, 1, 1), type_(hullNone), numbered_(1, true),
          label_(1, dummy_pointer), preview_(new RenderPreview(this))
 {
        //lyxerr << "sizeof InsetMath: " << sizeof(InsetMath) << endl;
@@ -155,7 +155,7 @@ InsetMathHull::InsetMathHull(Buffer * buf)
 
 
 InsetMathHull::InsetMathHull(Buffer * buf, HullType type)
-       : InsetMathGrid(buf, getCols(type), 1), type_(type), numbered_(1, false),
+       : InsetMathGrid(buf, getCols(type), 1), type_(type), numbered_(1, true),
          label_(1, dummy_pointer), preview_(new RenderPreview(this))
 {
        buffer_ = buf;
@@ -914,8 +914,7 @@ void InsetMathHull::glueall(HullType type)
                }
        }
        *this = InsetMathHull(buffer_, hullSimple);
-       if (label)
-               label_[0] = label;
+       label_[0] = label;
        cell(0) = ar;
        setDefaults();
 }
@@ -1026,6 +1025,7 @@ void InsetMathHull::mutate(HullType newtype)
                        numbered(0, false);
                } else {
                        setType(hullEquation);
+                       numbered(0, label_[0] ? true : false);
                        mutate(newtype);
                }
        }