]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/datavgen.cpp
Changed wxImage.ResampleBox to always use a box size of at least 2 by 2 pixels.
[wxWidgets.git] / src / generic / datavgen.cpp
index ef97bb925d1b16e3255ef67f8d3181cbb49c4cec..84520f5cce8e9fb7d6e3d66e96ac04d0ebf2d09c 100644 (file)
@@ -863,10 +863,11 @@ bool wxDataViewToggleRenderer::Render( wxRect cell, wxDC *dc, int WXUNUSED(state
     return true;
 }
 
-bool wxDataViewToggleRenderer::WXOnActivate(wxRect WXUNUSED(cell),
-                                            wxDataViewModel *model,
-                                            const wxDataViewItem& item,
-                                            unsigned int col)
+bool wxDataViewToggleRenderer::WXOnLeftClick(const wxPoint& WXUNUSED(cursor),
+                                             const wxRect& WXUNUSED(cell),
+                                             wxDataViewModel *model,
+                                             const wxDataViewItem& item,
+                                             unsigned int col)
 {
     if (model->IsEnabled(item, col))
     {
@@ -1026,7 +1027,7 @@ wxSize wxDataViewDateRenderer::GetSize() const
     return GetTextExtent(m_date.FormatDate());
 }
 
-bool wxDataViewDateRenderer::WXOnActivate(wxRect WXUNUSED(cell),
+bool wxDataViewDateRenderer::WXOnActivate(const wxRect& WXUNUSED(cell),
                                           wxDataViewModel *model,
                                           const wxDataViewItem& item,
                                           unsigned int col)
@@ -1605,10 +1606,11 @@ void wxDataViewMainWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
         wxMin( (int)(  GetLineAt( wxMax(0,update.y+update.height) ) - item_start + 1),
             (int)(GetRowCount( ) - item_start));
     unsigned int item_last = item_start + item_count;
-    // Get the parent of DataViewCtrl
-    wxWindow *parent = GetParent()->GetParent();
+
+    // Send the event to wxDataViewCtrl itself.
+    wxWindow * const parent = GetParent();
     wxDataViewEvent cache_event(wxEVT_COMMAND_DATAVIEW_CACHE_HINT, parent->GetId());
-    cache_event.SetEventObject(GetParent());
+    cache_event.SetEventObject(parent);
     cache_event.SetCache(item_start, item_last - 1);
     parent->ProcessWindowEvent(cache_event);