]> git.saurik.com Git - wxWidgets.git/commitdiff
Use gtk_text_buffer_select_range for selecting programmatically
authorRobert Roebling <robert@roebling.de>
Fri, 5 Dec 2008 10:09:47 +0000 (10:09 +0000)
committerRobert Roebling <robert@roebling.de>
Fri, 5 Dec 2008 10:09:47 +0000 (10:09 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57125 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/textctrl.cpp

index 8d5648bd771f946606161dbfcef2c8e2493d72a4..3ea51492c6005910a365ec999d5b05ffed99f727 100644 (file)
@@ -1344,8 +1344,7 @@ void wxTextCtrl::SetSelection( long from, long to )
         gtk_text_buffer_get_iter_at_offset( m_buffer, &fromi, from );
         gtk_text_buffer_get_iter_at_offset( m_buffer, &toi, to );
 
-        gtk_text_buffer_place_cursor( m_buffer, &fromi );
-        gtk_text_buffer_move_mark_by_name( m_buffer, "selection_bound", &fromi );
+        gtk_text_buffer_select_range( m_buffer, &fromi, &toi );
     }
     else // single line
     {