commit 704eede69b4a66c4815634a112a6cfae794e10f7
Author: Enrico Forestieri <for...@lyx.org>
Date:   Mon Nov 12 21:16:14 2018 +0100

    Fix bug #11367
    
    The overset, underset, and stackrel insets behave like the script
    rather than the fraction inset.
---
 src/mathed/InsetMathOverset.cpp  |    4 ++--
 src/mathed/InsetMathStackrel.cpp |    4 ++--
 src/mathed/InsetMathUnderset.cpp |    4 ++--
 status.23x                       |    2 ++
 4 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/src/mathed/InsetMathOverset.cpp b/src/mathed/InsetMathOverset.cpp
index cea8840..a69c1e0 100644
--- a/src/mathed/InsetMathOverset.cpp
+++ b/src/mathed/InsetMathOverset.cpp
@@ -34,7 +34,7 @@ void InsetMathOverset::metrics(MetricsInfo & mi, Dimension & 
dim) const
        Changer dummy2 = mi.base.changeEnsureMath();
        Dimension dim1;
        cell(1).metrics(mi, dim1);
-       Changer dummy = mi.base.changeFrac();
+       Changer dummy = mi.base.changeScript();
        Dimension dim0;
        cell(0).metrics(mi, dim0);
        dim.wid = max(dim0.width(), dim1.wid) + 4;
@@ -52,7 +52,7 @@ void InsetMathOverset::draw(PainterInfo & pi, int x, int y) 
const
        int m  = x + dim.wid / 2;
        int yo = y - dim1.asc - dim0.des - 1;
        cell(1).draw(pi, m - dim1.wid / 2, y);
-       Changer dummy = pi.base.changeFrac();
+       Changer dummy = pi.base.changeScript();
        cell(0).draw(pi, m - dim0.width() / 2, yo);
 }
 
diff --git a/src/mathed/InsetMathStackrel.cpp b/src/mathed/InsetMathStackrel.cpp
index dc01ffc..8b8ab3e 100644
--- a/src/mathed/InsetMathStackrel.cpp
+++ b/src/mathed/InsetMathStackrel.cpp
@@ -64,7 +64,7 @@ void InsetMathStackrel::metrics(MetricsInfo & mi, Dimension & 
dim) const
        Changer dummy2 = mi.base.changeEnsureMath();
        Dimension dim1;
        cell(1).metrics(mi, dim1);
-       Changer dummy = mi.base.changeFrac();
+       Changer dummy = mi.base.changeScript();
        Dimension dim0;
        cell(0).metrics(mi, dim0);
        if (nargs() > 2) {
@@ -90,7 +90,7 @@ void InsetMathStackrel::draw(PainterInfo & pi, int x, int y) 
const
        int m  = x + dim.width() / 2;
        int yo = y - dim1.ascent() - dim0.descent() - 1;
        cell(1).draw(pi, m - dim1.width() / 2, y);
-       Changer dummy = pi.base.changeFrac();
+       Changer dummy = pi.base.changeScript();
        cell(0).draw(pi, m - dim0.width() / 2, yo);
        if (nargs() > 2) {
                Dimension const & dim2 = cell(2).dimension(*pi.base.bv);
diff --git a/src/mathed/InsetMathUnderset.cpp b/src/mathed/InsetMathUnderset.cpp
index b8c5d14..78f005a 100644
--- a/src/mathed/InsetMathUnderset.cpp
+++ b/src/mathed/InsetMathUnderset.cpp
@@ -35,7 +35,7 @@ void InsetMathUnderset::metrics(MetricsInfo & mi, Dimension & 
dim) const
        Changer dummy2 = mi.base.changeEnsureMath();
        Dimension dim1;
        cell(1).metrics(mi, dim1);
-       Changer dummy = mi.base.changeFrac();
+       Changer dummy = mi.base.changeScript();
        Dimension dim0;
        cell(0).metrics(mi, dim0);
        dim.wid = max(dim0.width(), dim1.width()) + 4;
@@ -53,7 +53,7 @@ void InsetMathUnderset::draw(PainterInfo & pi, int x, int y) 
const
        int m  = x + dim.wid / 2;
        int yo = y + dim1.descent() + dim0.ascent() + 1;
        cell(1).draw(pi, m - dim1.width() / 2, y);
-       Changer dummy = pi.base.changeFrac();
+       Changer dummy = pi.base.changeScript();
        cell(0).draw(pi, m - dim0.width() / 2, yo);
 }
 
diff --git a/status.23x b/status.23x
index b10458b..7b154a7 100644
--- a/status.23x
+++ b/status.23x
@@ -179,6 +179,8 @@ What's new
 - Fix display issue of individual pre- and posttext in citation dialog
   (biblatex only) (bug 11352).
 
+- Fix display of overset, underset, and stackrel insets (bug 11367).
+
 
 * INTERNALS
 

Reply via email to