]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/datavcmn.cpp
Split intl.h into intl.h, language.h and translation.h.
[wxWidgets.git] / src / common / datavcmn.cpp
index af4987ae393b23b603f7e01f198ad2ca2ee30f66..de0608121e47d0e4915eba3d293c719908712171 100644 (file)
@@ -792,13 +792,22 @@ wxDataViewCustomRendererBase::RenderText(const wxString& text,
                                         text,
                                         *dc,
                                         GetEllipsizeMode(),
-                                        rect.width,
+                                        rectText.width,
                                         wxELLIPSIZE_FLAGS_NONE
                                     );
     }
 
+    // get the alignment to use
+    int align = GetAlignment();
+    if ( align == wxDVR_DEFAULT_ALIGNMENT )
+    {
+        // if we don't have an explicit alignment ourselves, use that of the
+        // column in horizontal direction and default vertical alignment
+        align = GetOwner()->GetAlignment() | wxALIGN_CENTRE_VERTICAL;
+    }
+
     dc->DrawLabel(ellipsizedText.empty() ? text : ellipsizedText,
-                  rectText, GetAlignment());
+                  rectText, align);
 }
 
 //-----------------------------------------------------------------------------
@@ -1477,6 +1486,7 @@ void wxDataViewListStore::InsertItem(  unsigned int row, const wxVector<wxVarian
 void wxDataViewListStore::DeleteItem( unsigned int row )
 {
     wxVector<wxDataViewListStoreLine*>::iterator it = m_data.begin() + row;
+    delete *it;
     m_data.erase( it );
 
     RowDeleted( row );