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
This commit is contained in:
Enrico Forestieri 2007-03-28 00:02:15 +00:00
parent 5068a159af
commit 33707ecc13

View File

@ -196,12 +196,13 @@ int InsetMathScript::dy01(int asc, int des, int what) const
if (hasDown()) { if (hasDown()) {
int del = asc - udes - dasc; int del = asc - udes - dasc;
if (del + des <= 2) { if (del + des <= 2) {
des = 2 - del; int newdes = 2 - del;
del = slevel - asc + udes; del = slevel - asc + udes;
if (del > 0) { if (del > 0) {
asc += del; asc += del;
des -= del; newdes -= del;
} }
des = max(des, newdes);
} }
} }
} }