minor refactor
This commit is contained in:
parent
d648e741df
commit
b3b5affeb8
|
@ -1255,10 +1255,10 @@ void QSynEditPainter::paintLines()
|
||||||
}
|
}
|
||||||
areaList.append(area);
|
areaList.append(area);
|
||||||
|
|
||||||
mEdit->mGlyphPostionListCache.str = sLine;
|
mEdit->mGlyphPostionCacheForInputMethod.str = sLine;
|
||||||
mEdit->mGlyphPostionListCache.glyphCharList = glyphStartCharList;
|
mEdit->mGlyphPostionCacheForInputMethod.glyphCharList = glyphStartCharList;
|
||||||
mEdit->mGlyphPostionListCache.glyphPositionList = glyphStartPositionsList;
|
mEdit->mGlyphPostionCacheForInputMethod.glyphPositionList = glyphStartPositionsList;
|
||||||
mEdit->mGlyphPostionListCache.strWidth = tokenLeft;
|
mEdit->mGlyphPostionCacheForInputMethod.strWidth = tokenLeft;
|
||||||
}
|
}
|
||||||
paintEditAreas(areaList);
|
paintEditAreas(areaList);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2503,9 +2503,9 @@ QRect QSynEdit::calculateCaretRect() const
|
||||||
QString sLine = lineText().left(mCaretX-1)
|
QString sLine = lineText().left(mCaretX-1)
|
||||||
+ mInputPreeditString
|
+ mInputPreeditString
|
||||||
+ lineText().mid(mCaretX-1);
|
+ lineText().mid(mCaretX-1);
|
||||||
if (sLine == mGlyphPostionListCache.str) {
|
if (sLine == mGlyphPostionCacheForInputMethod.str) {
|
||||||
int glyphIdx = searchForSegmentIdx(mGlyphPostionListCache.glyphCharList,0,sLine.length(),mCaretX+mInputPreeditString.length()-1);
|
int glyphIdx = searchForSegmentIdx(mGlyphPostionCacheForInputMethod.glyphCharList,0,sLine.length(),mCaretX+mInputPreeditString.length()-1);
|
||||||
coord.x = segmentIntervalStart(mGlyphPostionListCache.glyphPositionList,0,mGlyphPostionListCache.strWidth, glyphIdx);
|
coord.x = segmentIntervalStart(mGlyphPostionCacheForInputMethod.glyphPositionList,0,mGlyphPostionCacheForInputMethod.strWidth, glyphIdx);
|
||||||
} else
|
} else
|
||||||
coord.x = charToGlyphLeft(mCaretY, sLine, mCaretX+mInputPreeditString.length());
|
coord.x = charToGlyphLeft(mCaretY, sLine, mCaretX+mInputPreeditString.length());
|
||||||
}
|
}
|
||||||
|
|
|
@ -779,7 +779,7 @@ private:
|
||||||
int mWheelAccumulatedDeltaY;
|
int mWheelAccumulatedDeltaY;
|
||||||
|
|
||||||
PFormatter mFormatter;
|
PFormatter mFormatter;
|
||||||
GlyphPostionsListCache mGlyphPostionListCache;
|
GlyphPostionsListCache mGlyphPostionCacheForInputMethod;
|
||||||
|
|
||||||
friend class QSynEditPainter;
|
friend class QSynEditPainter;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue