// Do this last since it provides callbacks into application code.
if(NULL != impl.mEditableControlInterface)
{
- impl.mEditableControlInterface->TextChanged();
+ impl.mEditableControlInterface->TextChanged(true);
}
}
const Length numberOfCharactersInModel = logicalModel->mText.Count();
// Restrict new text to fit within Maximum characters setting.
- Length maxSizeOfNewText = std::min((impl.mMaximumNumberOfCharacters - numberOfCharactersInModel), characterCount);
+ Length temp_length = (impl.mMaximumNumberOfCharacters > numberOfCharactersInModel ? impl.mMaximumNumberOfCharacters - numberOfCharactersInModel : 0);
+ Length maxSizeOfNewText = std::min(temp_length, characterCount);
maxLengthReached = (characterCount > maxSizeOfNewText);
// The cursor position.
if(NULL != impl.mEditableControlInterface)
{
// Do this last since it provides callbacks into application code
- impl.mEditableControlInterface->TextChanged();
+ impl.mEditableControlInterface->TextChanged(true);
}
}