Optimize wxGTK2 wxTextCtrl::GetLineText
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34849 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1091,12 +1091,12 @@ wxString wxTextCtrl::GetLineText( long lineNo ) const
|
||||
#else
|
||||
GtkTextIter line;
|
||||
gtk_text_buffer_get_iter_at_line(m_buffer,&line,lineNo);
|
||||
GtkTextIter end;
|
||||
gtk_text_buffer_get_end_iter(m_buffer,&end );
|
||||
GtkTextIter end = line;
|
||||
gtk_text_iter_forward_to_line_end(&end);
|
||||
gchar *text = gtk_text_buffer_get_text(m_buffer,&line,&end,TRUE);
|
||||
wxString result(wxGTK_CONV_BACK(text));
|
||||
g_free(text);
|
||||
return result.BeforeFirst(wxT('\n'));
|
||||
return result;
|
||||
#endif
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user