From: Enrico Forestieri Date: Wed, 28 Mar 2007 00:02:15 +0000 (+0000) Subject: Small refinement to subscript placement X-Git-Tag: 1.6.10~10454 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=33707ecc136359daea8b0df4d9e31246ab22f563;p=lyx.git Small refinement to subscript placement * src/mathed/InsetMathScript.C (InsetMathScript::dy01): Make sure that the subscript is placed not higher than when it appears alone. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17602 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/mathed/InsetMathScript.C b/src/mathed/InsetMathScript.C index 2a76532273..801036ee4a 100644 --- a/src/mathed/InsetMathScript.C +++ b/src/mathed/InsetMathScript.C @@ -196,12 +196,13 @@ int InsetMathScript::dy01(int asc, int des, int what) const if (hasDown()) { int del = asc - udes - dasc; if (del + des <= 2) { - des = 2 - del; + int newdes = 2 - del; del = slevel - asc + udes; if (del > 0) { asc += del; - des -= del; + newdes -= del; } + des = max(des, newdes); } } }