mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-06 18:24:26 +08:00
Do not display grid cells as modified if new value is effectively the same as the old one. Especially minimizes INSERTs for "Duplicate row" feature.
This commit is contained in:
@ -1926,11 +1926,16 @@ begin
|
||||
CreateUpdateRow;
|
||||
EnsureFullRow;
|
||||
end;
|
||||
FCurrentUpdateRow[Column].NewText := NewText;
|
||||
if DataType(Column).Category in [dtcInteger, dtcReal] then
|
||||
FCurrentUpdateRow[Column].NewText := UnformatNumber(FCurrentUpdateRow[Column].NewText);
|
||||
FCurrentUpdateRow[Column].NewIsNull := Null;
|
||||
FCurrentUpdateRow[Column].Modified := True;
|
||||
if Null then
|
||||
FCurrentUpdateRow[Column].NewText := ''
|
||||
else begin
|
||||
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].NewIsNull <> FCurrentUpdateRow[Column].OldIsNull);
|
||||
end;
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user