Return -1 from wxGridRowOperations::GetLineBefore(0) to ensure that we exit
the loop in wxGrid::PosToEdgeOfLine(). Doing this is the logical thing to do
as wxGridColumnOperations::GetLineBefore() already behaved like this and this
was is more expected than returning 0, as the function previously did for some
reason.
Closes #15035.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73487
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// NB: As GetLineAt(), currently this is always identity for rows.
virtual int GetLinePos(const wxGrid *grid, int line) const = 0;
// NB: As GetLineAt(), currently this is always identity for rows.
virtual int GetLinePos(const wxGrid *grid, int line) const = 0;
- // Return the index of the line just before the given one.
+ // Return the index of the line just before the given one or wxNOT_FOUND.
virtual int GetLineBefore(const wxGrid* grid, int line) const = 0;
// Get the row or column label window
virtual int GetLineBefore(const wxGrid* grid, int line) const = 0;
// Get the row or column label window
{ return line; } // TODO: implement row reordering
virtual int GetLineBefore(const wxGrid* WXUNUSED(grid), int line) const
{ return line; } // TODO: implement row reordering
virtual int GetLineBefore(const wxGrid* WXUNUSED(grid), int line) const
- { return line ? line - 1 : line; }
virtual wxWindow *GetHeaderWindow(wxGrid *grid) const
{ return grid->GetGridRowLabelWindow(); }
virtual wxWindow *GetHeaderWindow(wxGrid *grid) const
{ return grid->GetGridRowLabelWindow(); }