Fix wxGridColumnOperations::GetLineBefore() for the first column.
We should return -1 from here as there is no column before the first one and wxGridRowOperations::GetLineBefore() already does this. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73459 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -692,7 +692,10 @@ public:
|
||||
{ return grid->GetColPos(line); }
|
||||
|
||||
virtual int GetLineBefore(const wxGrid* grid, int line) const
|
||||
{ return grid->GetColAt(wxMax(0, grid->GetColPos(line) - 1)); }
|
||||
{
|
||||
int posBefore = grid->GetColPos(line) - 1;
|
||||
return posBefore >= 0 ? grid->GetColAt(posBefore) : wxNOT_FOUND;
|
||||
}
|
||||
|
||||
virtual wxWindow *GetHeaderWindow(wxGrid *grid) const
|
||||
{ return grid->GetGridColLabelWindow(); }
|
||||
|
Reference in New Issue
Block a user