mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-26 11:17:57 +08:00
Move responsibility for well formed floats and integers from TMySQLQuery.SetCol() to caller, so new values don't get touched at all, and to avoid double-unformatted numbers in "Duplicate row" feature. Fixes issue #1936.
This commit is contained in:
@ -6797,6 +6797,8 @@ begin
|
|||||||
RowNum := Sender.GetNodeData(Node);
|
RowNum := Sender.GetNodeData(Node);
|
||||||
Results.RecNo := RowNum^;
|
Results.RecNo := RowNum^;
|
||||||
try
|
try
|
||||||
|
if Results.DataType(Column).Category in [dtcInteger, dtcReal] then
|
||||||
|
NewText := UnformatNumber(NewText);
|
||||||
Results.SetCol(Column, NewText, False);
|
Results.SetCol(Column, NewText, False);
|
||||||
except
|
except
|
||||||
on E:EDatabaseError do MessageDlg(E.Message, mtError, [mbOK], 0);
|
on E:EDatabaseError do MessageDlg(E.Message, mtError, [mbOK], 0);
|
||||||
|
@ -1932,11 +1932,8 @@ begin
|
|||||||
FCurrentUpdateRow[Column].NewIsNull := Null;
|
FCurrentUpdateRow[Column].NewIsNull := Null;
|
||||||
if Null then
|
if Null then
|
||||||
FCurrentUpdateRow[Column].NewText := ''
|
FCurrentUpdateRow[Column].NewText := ''
|
||||||
else begin
|
else
|
||||||
FCurrentUpdateRow[Column].NewText := NewText;
|
FCurrentUpdateRow[Column].NewText := NewText;
|
||||||
if DataType(Column).Category in [dtcInteger, dtcReal] then
|
|
||||||
FCurrentUpdateRow[Column].NewText := UnformatNumber(FCurrentUpdateRow[Column].NewText);
|
|
||||||
end;
|
|
||||||
FCurrentUpdateRow[Column].Modified := (FCurrentUpdateRow[Column].NewText <> FCurrentUpdateRow[Column].OldText) or
|
FCurrentUpdateRow[Column].Modified := (FCurrentUpdateRow[Column].NewText <> FCurrentUpdateRow[Column].OldText) or
|
||||||
(FCurrentUpdateRow[Column].NewIsNull <> FCurrentUpdateRow[Column].OldIsNull);
|
(FCurrentUpdateRow[Column].NewIsNull <> FCurrentUpdateRow[Column].OldIsNull);
|
||||||
end;
|
end;
|
||||||
|
Reference in New Issue
Block a user