View Issue Details

IDProjectCategoryView StatusLast Update
0006534JEDI VCL00 JVCL Componentspublic2019-04-30 16:08
ReporteracgubamgAssigned Toobones 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
PlatformRAD Studio berlin 10.1 up2OSWindowsOS Version10 Pro
Product VersionDaily / GIT 
Target VersionFixed in VersionDaily / GIT 
Summary0006534: DecimalPlaces, DecimalPlacesAlwaysShown
DescriptionThe function below:

function TJvCustomNumEdit.GetEditFormat:String;
begin
  Result := ',0'; // must put the thousands separator by default to allow direct edit of value (paste for example)
  if FDecimalPlaces > 0 then
    if FDecimalPlacesAlwaysShown then
       Result := Result + '.' + MakeStr('0', FDecimalPlaces)
    else
       Result := Result + '.' + MakeStr('#', FDecimalPlaces);
end;


There could be changed to the code:
function TJvCustomNumEdit.GetEditFormat:String;
begin
  if FDecimalPlaces = 0 then
    Result := '0'
  else
  begin
    Result := ',0';
    if FDecimalPlacesAlwaysShown then
       Result := Result + '.' + MakeStr('0', FDecimalPlaces)
    else
       Result := Result + '.' + MakeStr('#', FDecimalPlaces);
  end;
end;

Thus if FDecimalPlaces is greater than zero, the separator shown, otherwise, it remains as an integer number. And when using the jvcalcedit1.text as integer, returns only numbers.



Steps To ReproduceCopy the value of a TJvCalcEdit component, with value grander than 1000.
Its will be copied as format: '1.000'

When user paste value on a TDBgrid, ocorrur a error.
See picture attached.
TagsNo tags attached.

Activities

2016-11-18 18:10

 

erro.png (11,365 bytes)
erro.png (11,365 bytes)

obones

2018-07-18 15:49

administrator   ~0021510

Could you check if the issue is still present in the latest GIT content? If yes, please provide the zipped sources of an application showing this.

mh

2019-04-27 14:53

reporter   ~0021767

Created this pull request containing the above proposed fix:
https://github.com/project-jedi/jvcl/pull/103

Issue History

Date Modified Username Field Change
2016-11-18 18:10 acgubamg New Issue
2016-11-18 18:10 acgubamg File Added: erro.png
2018-07-18 15:49 obones Note Added: 0021510
2018-07-18 15:49 obones Status new => feedback
2019-04-27 14:53 mh Note Added: 0021767
2019-04-30 16:08 obones Status feedback => resolved
2019-04-30 16:08 obones Fixed in Version => Daily / GIT
2019-04-30 16:08 obones Resolution open => fixed
2019-04-30 16:08 obones Assigned To => obones