Fix: save time value properly
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2454 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
parent
687d0023d0
commit
cf72334b8a
@ -5,6 +5,7 @@ Note: Lazarus Trunk required
|
||||
|
||||
Version pre-1.1
|
||||
--------------------------------------------------
|
||||
2012-06-12 Fixed: TJDbGridTimeCtrl, store time value
|
||||
2012-03-14 Fixed: Prevent double updates (QT widgetset) in edit widgets
|
||||
2012-03-06 Fixed: Focus issues
|
||||
|
||||
|
@ -194,7 +194,7 @@ begin
|
||||
begin
|
||||
aTime := StrToTime(texto);
|
||||
Result := TimeString;// FormatDateTime(aTimeFormat, aTime);
|
||||
end;
|
||||
end
|
||||
end;
|
||||
tokens.Free;
|
||||
//ShowMessage('Hora normalizada: ' + Result);
|
||||
|
@ -497,7 +497,7 @@ begin
|
||||
begin
|
||||
Field.DataSet.DisableControls;
|
||||
Field.DataSet.Edit;
|
||||
Field.AsDateTime := theValue;
|
||||
Field.Text := NormalizeTime(CellEditor.Caption, Field.AsDateTime);
|
||||
Field.DataSet.EnableControls;
|
||||
end;
|
||||
end;
|
||||
@ -545,6 +545,7 @@ begin
|
||||
end;
|
||||
end
|
||||
else
|
||||
if Length(CellEditor.Caption) <> 0 then
|
||||
if (Key in [VK_RETURN, VK_TAB, VK_UP, VK_DOWN, VK_LEFT, VK_RIGHT]) and
|
||||
(not IsValidTimeString(NormalizeTime(CellEditor.Caption, theValue))) then
|
||||
begin
|
||||
@ -582,7 +583,7 @@ begin
|
||||
begin
|
||||
theValue := StrToTime(CellEditor.Caption);
|
||||
Field.DataSet.Edit;
|
||||
Field.AsDateTime := theValue;
|
||||
Field.Text := NormalizeTime(CellEditor.Caption, Field.AsDateTime);
|
||||
CellEditor.SelectAll;
|
||||
updated := True;
|
||||
end;
|
||||
@ -916,7 +917,7 @@ begin
|
||||
Field.DataSet.Edit;
|
||||
if decimals > 0 then
|
||||
theValue := ScaleTo(theValue, fDecimals);
|
||||
Field.Value := theValue; ;
|
||||
Field.Value := theValue;
|
||||
CellEditor.Text := Field.AsString;
|
||||
updated := True;
|
||||
end;
|
||||
@ -1095,4 +1096,3 @@ begin
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user