From: Enrico Forestieri Date: Sat, 10 Nov 2018 14:50:51 +0000 (+0100) Subject: Fix bug #11367 X-Git-Tag: lyx-2.4.0dev-acb2ca7b~2914 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=9c3bbeefab84f91422c6be98ca0664a33682e6de;p=lyx.git Fix bug #11367 The overset, underset, and stackrel insets behave like the script rather than the fraction inset. --- diff --git a/src/mathed/InsetMathOverset.cpp b/src/mathed/InsetMathOverset.cpp index b659a9eab4..9d835f0d9e 100644 --- a/src/mathed/InsetMathOverset.cpp +++ b/src/mathed/InsetMathOverset.cpp @@ -36,7 +36,7 @@ void InsetMathOverset::metrics(MetricsInfo & mi, Dimension & dim) const Changer dummy2 = mi.base.changeEnsureMath(); Dimension dim0; cell(0).metrics(mi, dim0); - Changer dummy = mi.base.changeFrac(); + Changer dummy = mi.base.changeScript(); Dimension dim1; cell(1).metrics(mi, dim1); dim.wid = max(dim1.width(), dim0.wid) + 4; @@ -54,7 +54,7 @@ void InsetMathOverset::draw(PainterInfo & pi, int x, int y) const int m = x + dim.wid / 2; int yo = y - dim0.asc - dim1.des - 1; cell(0).draw(pi, m - dim0.wid / 2, y); - Changer dummy = pi.base.changeFrac(); + Changer dummy = pi.base.changeScript(); cell(1).draw(pi, m - dim1.width() / 2, yo); } diff --git a/src/mathed/InsetMathStackrel.cpp b/src/mathed/InsetMathStackrel.cpp index 4f9623e5e6..9a9c66f24c 100644 --- a/src/mathed/InsetMathStackrel.cpp +++ b/src/mathed/InsetMathStackrel.cpp @@ -66,7 +66,7 @@ void InsetMathStackrel::metrics(MetricsInfo & mi, Dimension & dim) const Changer dummy2 = mi.base.changeEnsureMath(); Dimension dim0; cell(0).metrics(mi, dim0); - Changer dummy = mi.base.changeFrac(); + Changer dummy = mi.base.changeScript(); Dimension dim1; cell(1).metrics(mi, dim1); if (nargs() > 2) { @@ -92,7 +92,7 @@ void InsetMathStackrel::draw(PainterInfo & pi, int x, int y) const int m = x + dim.width() / 2; int yo = y - dim0.ascent() - dim1.descent() - 1; cell(0).draw(pi, m - dim0.width() / 2, y); - Changer dummy = pi.base.changeFrac(); + Changer dummy = pi.base.changeScript(); cell(1).draw(pi, m - dim1.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 559889073b..794427e2c2 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 dim0; cell(0).metrics(mi, dim0); - Changer dummy = mi.base.changeFrac(); + Changer dummy = mi.base.changeScript(); Dimension dim1; cell(1).metrics(mi, dim1); dim.wid = max(dim1.width(), dim0.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 + dim0.descent() + dim1.ascent() + 1; cell(0).draw(pi, m - dim0.width() / 2, y); - Changer dummy = pi.base.changeFrac(); + Changer dummy = pi.base.changeScript(); cell(1).draw(pi, m - dim1.width() / 2, yo); }