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() )
|
if ( IsMultiLine() )
|
||||||
{
|
{
|
||||||
int numLines = GetNumberOfLines();
|
return ::GetWindowTextLength(GetHwnd());
|
||||||
long posStartLastLine = XYToPosition(0, numLines - 1);
|
|
||||||
|
|
||||||
long lenLastLine = GetLengthOfLineContainingPos(posStartLastLine);
|
|
||||||
|
|
||||||
return posStartLastLine + lenLastLine;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return wxTextEntry::GetLastPosition();
|
return wxTextEntry::GetLastPosition();
|
||||||
|
Reference in New Issue
Block a user