View Issue Details

IDProjectCategoryView StatusLast Update
0030608LazarusLCLpublic2016-12-18 20:19
ReporterK155LA3Assigned ToJesus Reyes 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformOSWindowsOS Version7
Product Version1.7 (SVN)Product Buildrev. 52982 
Target Version1.8Fixed in Version1.7 (SVN) 
Summary0030608: TStringGrid when FixedRow = 0 instead of the data copied the title
DescriptionIf 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 Reproduce1 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 InformationThis 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
TagsNo tags attached.
Fixed in Revision52983
LazTarget1.8
Widgetset
Attached Files

Relationships

related to 0030556 resolvedJesus Reyes TStringGrid empty cells does not replace cells with data when copy and paste one empty cell or one column with empty cell. 
related to 0030454 resolvedJesus Reyes TStringGrid copy selection bug, when cell in last column in selected range is empty. 

Activities

K155LA3

2016-09-16 22:37

reporter  

TSGBug4.gif (92,245 bytes)
TSGBug4.gif (92,245 bytes)

Jesus Reyes

2016-09-17 01:41

developer   ~0094688

Thanks. Fixed.

K155LA3

2016-09-17 13:58

reporter   ~0094694

Thank you.

I think that this condition can be removed:

 - if (aRow=0) (FixedRow>0) then
 - SelStr := SelStr + QuoteText(Columns[k].Title.Caption)
 - else

Because the fixed cells can never be selected. Or fixed cell selection is possible?

Jesus Reyes

2016-09-17 19:48

developer   ~0094696

Selection can be set by code.

Issue History

Date Modified Username Field Change
2016-09-16 22:37 K155LA3 New Issue
2016-09-16 22:37 K155LA3 File Added: TSGBug4.gif
2016-09-16 23:59 Jesus Reyes Assigned To => Jesus Reyes
2016-09-16 23:59 Jesus Reyes Status new => assigned
2016-09-17 01:41 Jesus Reyes Fixed in Revision => 52983
2016-09-17 01:41 Jesus Reyes LazTarget => 1.8
2016-09-17 01:41 Jesus Reyes Note Added: 0094688
2016-09-17 01:41 Jesus Reyes Status assigned => resolved
2016-09-17 01:41 Jesus Reyes Fixed in Version => 1.7 (SVN)
2016-09-17 01:41 Jesus Reyes Resolution open => fixed
2016-09-17 01:41 Jesus Reyes Target Version => 1.8
2016-09-17 13:58 K155LA3 Note Added: 0094694
2016-09-17 19:48 Jesus Reyes Note Added: 0094696
2016-12-18 20:19 Jesus Reyes Relationship added related to 0030556
2016-12-18 20:19 Jesus Reyes Relationship added related to 0030454