mirror of
https://github.com/reactos/wine.git
synced 2024-11-24 20:30:01 +00:00
richedit: Avoid redundant calls to ME_CalcRunExtent.
ME_SplitRun is only called by wrapping code. In all but one call the returned second half of the split run will be returned, get passed back to ME_WrapHandleRun, then ME_CalcRunExtent will be called at the start of ME_WrapHandleRun through ME_WrapSizeRun.
This commit is contained in:
parent
8b8e4f89b2
commit
c0ee555e8f
@ -273,7 +273,6 @@ ME_DisplayItem *ME_SplitRun(ME_WrapContext *wc, ME_DisplayItem *item, int nVChar
|
||||
run2 = &cursor.pRun->member.run;
|
||||
|
||||
ME_CalcRunExtent(wc->context, para, wc->nRow ? wc->nLeftMargin : wc->nFirstMargin, run);
|
||||
ME_CalcRunExtent(wc->context, para, wc->nRow ? wc->nLeftMargin : wc->nFirstMargin, run2);
|
||||
|
||||
run2->pt.x = run->pt.x+run->nWidth;
|
||||
run2->pt.y = run->pt.y;
|
||||
|
@ -361,6 +361,9 @@ static ME_DisplayItem *ME_WrapHandleRun(ME_WrapContext *wc, ME_DisplayItem *p)
|
||||
if (black) {
|
||||
wc->bOverflown = FALSE;
|
||||
pp = ME_SplitRun(wc, p, black);
|
||||
ME_CalcRunExtent(wc->context, &wc->pPara->member.para,
|
||||
wc->nRow ? wc->nLeftMargin : wc->nFirstMargin,
|
||||
&pp->member.run);
|
||||
ME_InsertRowStart(wc, pp);
|
||||
return pp;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user