]> git.lyx.org Git - features.git/commitdiff
Fixup 89662a68: remove markers that should not be there
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 3 Feb 2017 09:47:33 +0000 (10:47 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 3 Feb 2017 09:52:53 +0000 (10:52 +0100)
InsetMathDelim does not need markers because the delimiters are
visually enough.

CommandInset (like InsetMathRef) does have cells, but they are hidden
(only for storage). Therefore the default InsetMath::markers() method
mistakenly added markers. In practice, the markers were never active
(since the cursor cannot go into the inset), but some space was
reserved for them.

src/mathed/CommandInset.h
src/mathed/InsetMathDelim.h

index 770ecb388d78d6e98808d5a2446157599376a6f8..68d0d13c5331612ba6daa644d5563c70a43aac00 100644 (file)
@@ -28,6 +28,8 @@ public:
        explicit CommandInset(Buffer * buf, docstring const & name,
                bool needs_math_mode = true);
        ///
+       marker_type marker() const { return NO_MARKER; }
+       ///
        void metrics(MetricsInfo & mi, Dimension & dim) const;
        ///
        void draw(PainterInfo & pi, int x, int y) const;
index 5a7e8164049cfb7948559b8dd12587adc149d57a..bc49ce3c592c4ba7575d60e7ace6f89b0231cba1 100644 (file)
@@ -32,6 +32,8 @@ public:
        InsetMathDelim const * asDelimInset() const { return this; }
        ///
        MathClass mathClass() const { return MC_INNER; }
+       ///
+       marker_type marker() const { return NO_MARKER; }
        /// is it (...)?
        bool isParenthesis() const;
        /// is it [...]?