// The value of -1 is special and means to fit the height to the row label.
if ( height == -1 )
{
+ // As with the columns, ignore attempts to auto-size the hidden rows.
+ if ( GetRowHeight(row) == 0 )
+ return;
+
long w, h;
wxArrayString lines;
wxClientDC dc(m_rowLabelWin);
// The value of -1 is special and means to fit the width to the column label.
if ( width == -1 )
{
+ // We currently don't support auto-sizing hidden columns. We could, but
+ // it's not clear whether this is really needed and it would make the
+ // code more complex.
+ if ( GetColWidth(col) == 0 )
+ return;
+
long w, h;
wxArrayString lines;
wxClientDC dc(m_colWindow);
{
const bool column = direction == wxGRID_COLUMN;
+ // We don't support auto-sizing hidden rows or columns, this doesn't seem
+ // to make much sense.
+ if ( column )
+ {
+ if ( GetColWidth(colOrRow) == 0 )
+ return;
+ }
+ else
+ {
+ if ( GetRowHeight(colOrRow) == 0 )
+ return;
+ }
+
wxClientDC dc(m_gridWin);
// cancel editing of cell
row = rowOrCol;
col = colOrRow;
}
- else
+ else
{
row = colOrRow;
col = rowOrCol;