[escher] Fix buffer choice in TextField::glyphFrameAtPosition

This commit is contained in:
Léa Saviot
2019-01-31 10:56:17 +01:00
committed by Émilie Feral
parent 4f63b16e0a
commit b2a97cfc7a
7 changed files with 14 additions and 12 deletions

View File

@@ -20,7 +20,7 @@ void TextInput::ContentView::setFont(const KDFont * font) {
}
KDRect TextInput::ContentView::cursorRect() {
return glyphFrameAtPosition(m_cursorLocation);
return glyphFrameAtPosition(editedText(), m_cursorLocation);
}
void TextInput::ContentView::layoutSubviews() {
@@ -32,7 +32,7 @@ void TextInput::ContentView::reloadRectFromPosition(const char * position, bool
}
KDRect TextInput::ContentView::dirtyRectFromPosition(const char * position, bool lineBreak) const {
KDRect glyphRect = glyphFrameAtPosition(position);
KDRect glyphRect = glyphFrameAtPosition(text(), position);
KDRect dirtyRect = KDRect(
glyphRect.x(),
glyphRect.y(),