wxGrid::UpdateBlockBeingSelected(int topRow, int leftCol,
int bottomRow, int rightCol)
{
+ MakeCellVisible(m_selectedBlockCorner);
+ m_selectedBlockCorner = wxGridCellCoords(bottomRow, rightCol);
+
if ( m_selection )
{
switch ( m_selection->GetSelectionMode() )
}
}
- m_selectedBlockCorner = wxGridCellCoords(bottomRow, rightCol);
- MakeCellVisible(m_selectedBlockCorner);
-
EnsureFirstLessThanSecond(topRow, bottomRow);
EnsureFirstLessThanSecond(leftCol, rightCol);
bool wxGrid::IsCurrentCellReadOnly() const
{
- // const_cast
- wxGridCellAttr* attr = ((wxGrid *)this)->GetCellAttr(m_currentCellCoords);
+ wxGridCellAttr*
+ attr = const_cast<wxGrid *>(this)->GetCellAttr(m_currentCellCoords);
bool readonly = attr->IsReadOnly();
attr->DecRef();
else if ( line > 0 &&
pos - oper.GetLineStartPos(this,
line) < WXGRID_LABEL_EDGE_ZONE )
- return line - 1;
+ {
+ return oper.GetLineBefore(this, line);
+ }
}
return -1;
{
if ( attr != NULL )
{
- wxGrid *self = (wxGrid *)this; // const_cast
+ wxGrid * const self = const_cast<wxGrid *>(this);
self->ClearAttrCache();
self->m_attrCache.row = row;
wxSize wxGrid::DoGetBestSize() const
{
- wxGrid *self = (wxGrid *)this; // const_cast
+ wxGrid * const self = const_cast<wxGrid *>(this);
// we do the same as in AutoSize() here with the exception that we don't
// change the column/row sizes, only calculate them