Don't try to redraw empty areas in wxGTK wxDataViewCtrl
This just results in warnings from pixman_region32_init_rect() and doesn't seem to have any useful effects.
This commit is contained in:
@@ -1670,6 +1670,12 @@ bool wxGtkDataViewModelNotifier::ValueChanged( const wxDataViewItem &item, unsig
|
|||||||
GTK_TREE_MODEL(wxgtk_model), &iter ));
|
GTK_TREE_MODEL(wxgtk_model), &iter ));
|
||||||
GdkRectangle cell_area;
|
GdkRectangle cell_area;
|
||||||
gtk_tree_view_get_cell_area( widget, path, gcolumn, &cell_area );
|
gtk_tree_view_get_cell_area( widget, path, gcolumn, &cell_area );
|
||||||
|
|
||||||
|
// Don't try to redraw the column if it's invisible, this just
|
||||||
|
// results in "BUG" messages from pixman_region32_init_rect()
|
||||||
|
// and would be useful even if it didn't anyhow.
|
||||||
|
if ( cell_area.width > 0 && cell_area.height > 0 )
|
||||||
|
{
|
||||||
#ifdef __WXGTK3__
|
#ifdef __WXGTK3__
|
||||||
GtkAdjustment* hadjust = gtk_scrollable_get_hadjustment(GTK_SCROLLABLE(widget));
|
GtkAdjustment* hadjust = gtk_scrollable_get_hadjustment(GTK_SCROLLABLE(widget));
|
||||||
#else
|
#else
|
||||||
@@ -1685,6 +1691,7 @@ bool wxGtkDataViewModelNotifier::ValueChanged( const wxDataViewItem &item, unsig
|
|||||||
gtk_widget_queue_draw_area( GTK_WIDGET(widget),
|
gtk_widget_queue_draw_area( GTK_WIDGET(widget),
|
||||||
cell_area.x - xdiff, ydiff + cell_area.y, cell_area.width, cell_area.height );
|
cell_area.x - xdiff, ydiff + cell_area.y, cell_area.width, cell_area.height );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
m_internal->ValueChanged( item, model_column );
|
m_internal->ValueChanged( item, model_column );
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user