TStringGrid when FixedRow = 0 instead of the data copied the title
Original Reporter info from Mantis: K155LA3
-
Reporter name:
Original Reporter info from Mantis: K155LA3
- Reporter name:
Description:
If you copy some cell from first row when FixedRow = 0 and paste it, than first row data not copied, they will replaced by the title.
Steps to reproduce:
1 Place StringGrid to form.
2 Add some column
3 Set in Options goEditing.
4 Set FixedRow = 0
5 Run programm.
6 Fill some cell (with first row) with any data.
7 Select some or one cell (with first row) and press Ctrl+C.
8 Place cursor on cell and press Ctrl+V
9 Data from first row was not copied, they will replaced by the title.
Additional information:
This bug exist in procedure TCustomStringGrid.CopyCellRectToClipboard(const R: TRect):
if (aRow=0) then
SelStr := SelStr + QuoteText(Columns[k].Title.Caption)
else
SelStr := SelStr + QuoteText(Cells[aCol,aRow]);
When FixedRow = 0 first row, which can be copied is 0, and it dose not copied, they will replaced by the title
it can be fixed by:
- if (aRow=0) then
+ if (aRow = 0) and (FixedRow > 0) then
Mantis conversion info:
- Mantis ID: 30608
- OS: Windows
- OS Build: 7
- Build: rev. 52982
- Version: 1.7 (SVN)
- Fixed in version: 1.7 (SVN)
- Fixed in revision: 52983 (#dff5e86d)
- Target version: 1.8