Remove useless check for grid size in wxGrid::FreezeTo()
This resulted in silently doing nothing when calling FreezeTo() on a grid which hadn't been resized to its full size yet, which seems wrong and not useful at all, so simply remove this check and freeze the requested rows/columns in any case -- it's the user responsibility to make the grid sufficiently big to allow the user to see the non-frozen parts.
This commit is contained in:
parent
2545cf5b8d
commit
6f00c734cd
2 changed files with 0 additions and 12 deletions
|
|
@ -5644,7 +5644,6 @@ public:
|
|||
Note that this method doesn't do anything, and returns @false, if any
|
||||
of the following conditions are true:
|
||||
- Either @a row or @a col are out of range
|
||||
- Size of the frozen area would be bigger than the current viewing area
|
||||
- There are any merged cells in the area to be frozen
|
||||
- Grid uses a native header control (see UseNativeColHeader())
|
||||
|
||||
|
|
|
|||
|
|
@ -5459,17 +5459,6 @@ bool wxGrid::FreezeTo(int row, int col)
|
|||
// freeze
|
||||
if ( row > m_numFrozenRows || col > m_numFrozenCols )
|
||||
{
|
||||
// check that it fits in client size
|
||||
int cw, ch;
|
||||
GetClientSize( &cw, &ch );
|
||||
|
||||
cw -= m_rowLabelWidth;
|
||||
ch -= m_colLabelHeight;
|
||||
|
||||
if ((row > 0 && GetRowBottom(row - 1) >= ch) ||
|
||||
(col > 0 && GetColRight(col - 1) >= cw))
|
||||
return false;
|
||||
|
||||
// check all involved cells for merged ones
|
||||
int cell_rows, cell_cols;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue