Return false from PositionToXY if passed in position is larger than the buffer. This should restore the

functionality of the boolean return value, while not returning false for valid input from end of buffer.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40090 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Mart Raudsepp
2006-07-14 04:22:38 +00:00
parent 5025996266
commit 01207937f6

View File

@@ -943,6 +943,10 @@ bool wxTextCtrl::PositionToXY(long pos, long *x, long *y ) const
if ( m_windowStyle & wxTE_MULTILINE )
{
GtkTextIter iter;
if (pos > GetLastPosition())
return false;
gtk_text_buffer_get_iter_at_offset(m_buffer, &iter, pos);
if ( y )