]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/datavgen.cpp
guard against nullptr
[wxWidgets.git] / src / generic / datavgen.cpp
index 673a83b7657fa5bb8dfe86927ab095b24b56016f..7f75fdacd5cc96b99ec96c295351aa418549b4dd 100644 (file)
@@ -532,6 +532,8 @@ public:
     int GetLineHeight( unsigned int row ) const; // m_lineHeight in fixed mode
     int GetLineAt( unsigned int y ) const;       // y / m_lineHeight in fixed mode
 
+    void SetRowHeight( int lineHeight ) { m_lineHeight = lineHeight; }
+
     // Some useful functions for row and item mapping
     wxDataViewItem GetItemByRow( unsigned int row ) const;
     int GetRowByItem( const wxDataViewItem & item ) const;
@@ -4124,6 +4126,16 @@ unsigned int wxDataViewCtrl::GetColumnCount() const
     return m_cols.GetCount();
 }
 
+bool wxDataViewCtrl::SetRowHeight( int lineHeight )
+{
+    if ( !m_clientArea )
+        return false;
+
+    m_clientArea->SetRowHeight(lineHeight);
+
+    return true;
+}
+
 wxDataViewColumn* wxDataViewCtrl::GetColumn( unsigned int idx ) const
 {
     return m_cols[idx];