]> git.saurik.com Git - wxWidgets.git/commitdiff
Correct MVC update region in GTK+ native version
authorRobert Roebling <robert@roebling.de>
Tue, 24 Apr 2007 09:44:32 +0000 (09:44 +0000)
committerRobert Roebling <robert@roebling.de>
Tue, 24 Apr 2007 09:44:32 +0000 (09:44 +0000)
   so that it takes horizontal scrolling into account.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45620 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/dataview.cpp

index 331c7e034d2eddecd6a6918709a84ce4d5764bfe..f8b13806ccb3da1c14293e9fde01905678643b52 100644 (file)
@@ -896,10 +896,14 @@ bool wxGtkDataViewListModelNotifier::ValueChanged( unsigned int model_col, unsig
             gtk_tree_view_get_cell_area( widget, path, column, &cell_area );
             gtk_tree_path_free( path );
 
+            GtkAdjustment* hadjust = gtk_tree_view_get_hadjustment( widget );
+            double d = gtk_adjustment_get_value( hadjust );
+            int xdiff = (int) d;
+
             int ydiff = column->button->allocation.height;
             // Redraw
             gtk_widget_queue_draw_area( GTK_WIDGET(widget),
-                cell_area.x, ydiff + cell_area.y, cell_area.width, cell_area.height );
+                cell_area.x - xdiff, ydiff + cell_area.y, cell_area.width, cell_area.height );
         }
 
         node = node->GetNext();