lineRun += firstLineIndex;
- // The line height is the addition of the line ascender and the line descender.
- // However, the line descender has a negative value, hence the subtraction.
- selectionBoxInfo->lineHeight = lineRun->ascender - lineRun->descender;
+ selectionBoxInfo->lineHeight = GetLineHeight(*lineRun);
GlyphIndex lastGlyphOfLine = lineRun->glyphRun.glyphIndex + lineRun->glyphRun.numberOfGlyphs - 1u;
// Update the line's vertical offset.
selectionBoxInfo->lineOffset = currentLineOffset + currentLineHeight;
- // The line height is the addition of the line ascender and the line descender.
- // However, the line descender has a negative value, hence the subtraction.
- selectionBoxInfo->lineHeight = lineRun->ascender - lineRun->descender;
+ selectionBoxInfo->lineHeight = GetLineHeight(*lineRun);
}
}
}
if(characterHit || (Controller::NoTextTap::HIGHLIGHT == action))
{
+ uint32_t oldStart = eventData->mLeftSelectionPosition;
+ uint32_t oldEnd = eventData->mRightSelectionPosition;
+
impl.ChangeState(EventData::SELECTING);
eventData->mLeftSelectionPosition = selectionStart;
// Cursor to be positioned at end of selection so if selection interrupted and edit mode restarted the cursor will be at end of selection
eventData->mPrimaryCursorPosition = std::max(eventData->mLeftSelectionPosition, eventData->mRightSelectionPosition);
+
+ if(impl.mSelectableControlInterface != nullptr)
+ {
+ impl.mSelectableControlInterface->SelectionChanged(oldStart, oldEnd, eventData->mLeftSelectionPosition, eventData->mRightSelectionPosition);
+ }
}
else if(Controller::NoTextTap::SHOW_SELECTION_POPUP == action)
{