porting back important speed fix

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_9_0_BRANCH@60901 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2009-06-05 20:51:47 +00:00
parent c71beb790a
commit 3127510223

View File

@@ -1125,6 +1125,15 @@ long wxMacMLTEControl::GetLastPosition() const
wxTextPos actualsize = 0 ;
Handle theText ;
#if wxUSE_UNICODE
OSErr err = TXNGetDataEncoded( m_txn, kTXNStartOffset, kTXNEndOffset, &theText, kTXNUnicodeTextData );
// all done
if ( err == noErr )
{
actualsize = GetHandleSize( theText )/sizeof(UniChar);
DisposeHandle( theText ) ;
}
#else
OSErr err = TXNGetDataEncoded( m_txn, kTXNStartOffset, kTXNEndOffset, &theText, kTXNTextData );
// all done
@@ -1133,6 +1142,7 @@ long wxMacMLTEControl::GetLastPosition() const
actualsize = GetHandleSize( theText ) ;
DisposeHandle( theText ) ;
}
#endif
else
{
actualsize = 0 ;