Simplify wxTextCtrl::GetLastPosition
Last position is just the number of characters in the buffer.
This commit is contained in:
@@ -1334,12 +1334,7 @@ wxTextPos wxTextCtrl::GetLastPosition() const
|
||||
{
|
||||
if ( IsMultiLine() )
|
||||
{
|
||||
int numLines = GetNumberOfLines();
|
||||
long posStartLastLine = XYToPosition(0, numLines - 1);
|
||||
|
||||
long lenLastLine = GetLengthOfLineContainingPos(posStartLastLine);
|
||||
|
||||
return posStartLastLine + lenLastLine;
|
||||
return ::GetWindowTextLength(GetHwnd());
|
||||
}
|
||||
|
||||
return wxTextEntry::GetLastPosition();
|
||||
|
Reference in New Issue
Block a user