]> git.lyx.org Git - lyx.git/commitdiff
Small refinement to subscript placement
authorEnrico Forestieri <forenr@lyx.org>
Wed, 28 Mar 2007 00:02:15 +0000 (00:02 +0000)
committerEnrico Forestieri <forenr@lyx.org>
Wed, 28 Mar 2007 00:02:15 +0000 (00:02 +0000)
* 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

src/mathed/InsetMathScript.C

index 2a76532273de16ee718c2cd4ddb0502032d1b98c..801036ee4a2b726cc55842ee7388d81561fb1511 100644 (file)
@@ -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);
                        }
                }
        }