From: Robert Roebling Date: Tue, 24 Apr 2007 09:44:32 +0000 (+0000) Subject: Correct MVC update region in GTK+ native version X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/1a64259d4ee3356e7deef2c3d9ba49423da0443f Correct MVC update region in GTK+ native version 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 --- diff --git a/src/gtk/dataview.cpp b/src/gtk/dataview.cpp index 331c7e034d..f8b13806cc 100644 --- a/src/gtk/dataview.cpp +++ b/src/gtk/dataview.cpp @@ -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();