You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Operating system: Windows 8.1 wxPython version & source: wxPython 4.2.0 Python version & source: Python 3.9
Description of the problem:
To sort table rows by a selected column, I make a list of column values and rearrange row positions (SetRowPos) using the sorted list.
When sorting in ascending order everything works well, but when sorting in descending order further redraws of the table truncate it (and the ability to scroll lower with the scroller) to the former last row (the row with the highest ID).
Repeated direct sort restores the table's functionality.
Dragging the last line to the beginning with the mouse also leads to the same problems.
However, there is no similar problem for rearranging columns.
I assume that when redrawing, the calculation is carried out from the line with the largest ID, not the lines with the new last position..
Code analysis showed that the problem is probably just in wxWidgets.
In file wxWidgets/src/generic /grid.cpp in function void wxGrid::CalcDimensions()
// compute the size of the scrollable area
int w = m_numCols > 0 ? GetColRight(GetColAt(m_numCols - 1)) : 0;
int h = m_numRows > 0 ? GetRowBottom(m_numRows - 1) : 0;
The last line should probably also have GetRowBottom(GetRowAt(m_numRows - 1))
Operating system: Windows 8.1
wxPython version & source: wxPython 4.2.0
Python version & source: Python 3.9
Description of the problem:
To sort table rows by a selected column, I make a list of column values and rearrange row positions (SetRowPos) using the sorted list.
When sorting in ascending order everything works well, but when sorting in descending order further redraws of the table truncate it (and the ability to scroll lower with the scroller) to the former last row (the row with the highest ID).
Repeated direct sort restores the table's functionality.
Dragging the last line to the beginning with the mouse also leads to the same problems.
However, there is no similar problem for rearranging columns.
I assume that when redrawing, the calculation is carried out from the line with the largest ID, not the lines with the new last position..
Code analysis showed that the problem is probably just in wxWidgets.
In file wxWidgets/src/generic /grid.cpp in function void wxGrid::CalcDimensions()
The last line should probably also have GetRowBottom(GetRowAt(m_numRows - 1))
Code Example (click to expand)
The text was updated successfully, but these errors were encountered: