StringGrid : bug after cell changed by keyboard and then removed
Original Reporter info from Mantis: tintinux
-
Reporter name:
Original Reporter info from Mantis: tintinux
- Reporter name:
Description:
A cell receive a keyboard input (e.g : text erased), and then grid.rowcount is set to a lower value, there is later an exception trying to get text from the no more existing cell.
Steps to reproduce:
- Run the attached program.
- Click on the button in the main form : a grid with 2 rows is displayed.
- Select the cell in the second row
- Erase it's content with the keyboard (Delete key or Backspace). Do not use the Delete Button.
- The second form is closed. The program saves only non blank cells.
- Click again on the button
- An exception occurs, trying to read the cell [1,0] which do not exists anymore. Only one row should be displayed and accessed. Check the call stack.
You can check that when the 2nd row is deleted using the "Delete" button, or when nothing is deleted, there is no problem.
Additional information:
Occurs with version 1.8.4 as well as 2.1 trunk.
Mantis conversion info:
- Mantis ID: 34930
- OS: Windows and Linux
- OS Build: any
- Platform: x86
- Version: 2.1 (SVN)
- Fixed in version: 2.2
- Fixed in revision: 60217 (#ba5f6100)
- Monitored by: » tintinux (tintinux)
- Target version: 2.2