]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/textctrl.cpp
regenerated after version.bkl changes fixing -compatibility_version for Darwin
[wxWidgets.git] / src / gtk1 / textctrl.cpp
index ea62e181859e8f271ae68f646a015a1de94b5927..a6dfa4b31d8ea355fa7eef3aba8aad31ed399b36 100644 (file)
@@ -14,6 +14,7 @@
 #include "wx/utils.h"
 #include "wx/intl.h"
 #include "wx/log.h"
+#include "wx/math.h"
 #include "wx/settings.h"
 #include "wx/panel.h"
 #include "wx/strconv.h"
@@ -1029,7 +1030,7 @@ void wxTextCtrl::WriteText( const wxString &text )
 
         GtkAdjustment *adj = gtk_scrolled_window_get_vadjustment( GTK_SCROLLED_WINDOW(m_widget) );
         // Scroll to cursor, but only if scrollbar thumb is at the very bottom
-        if ( adj->value == adj->upper - adj->page_size )
+        if ( wxIsSameDouble(adj->value, adj->upper - adj->page_size) )
         {
             gtk_text_view_scroll_to_mark( GTK_TEXT_VIEW(m_text),
                     gtk_text_buffer_get_insert( m_buffer ), 0.0, FALSE, 0.0, 1.0 );