X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2fa73716ca5cf002bdd570a86da5d1cb09d7e3b0..cfddeb10674cb1ce9255d02e862d72245c73c87f:/src/gtk/dataview.cpp diff --git a/src/gtk/dataview.cpp b/src/gtk/dataview.cpp index 331c7e034d..448d7a762b 100644 --- a/src/gtk/dataview.cpp +++ b/src/gtk/dataview.cpp @@ -778,6 +778,7 @@ class wxGtkDataViewListModelNotifier: public wxDataViewListModelNotifier { public: wxGtkDataViewListModelNotifier( GtkWxListStore* gtk_store, wxDataViewListModel *wx_model ); + ~wxGtkDataViewListModelNotifier(); virtual bool RowAppended(); virtual bool RowPrepended(); @@ -788,13 +789,6 @@ public: virtual bool RowsReordered( unsigned int *new_order ); virtual bool Cleared(); - virtual bool Freed() - { - m_wx_model = NULL; - m_gtk_store = NULL; - return wxDataViewListModelNotifier::Freed(); - } - GtkWxListStore *m_gtk_store; wxDataViewListModel *m_wx_model; }; @@ -810,6 +804,12 @@ wxGtkDataViewListModelNotifier::wxGtkDataViewListModelNotifier( m_wx_model = wx_model; } +wxGtkDataViewListModelNotifier::~wxGtkDataViewListModelNotifier() +{ + m_wx_model = NULL; + m_gtk_store = NULL; +} + bool wxGtkDataViewListModelNotifier::RowAppended() { unsigned int pos = m_wx_model->GetRowCount()-1; @@ -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();