ValEdit: Fix InsertRow (Issue #0025881)

git-svn-id: trunk@44566 -
This commit is contained in:
bart 2014-03-31 21:19:27 +00:00
parent 8295aac859
commit d369e9fa44

View File

@ -800,10 +800,10 @@ end;
function TValueListEditor.InsertRow(const KeyName, Value: string; Append: Boolean): Integer;
var
NewInd, NewCol: Integer;
NewInd, NewRow: Integer;
Line: String;
begin
if (KeyName <> '') and (Value <> '') then
if not ((KeyName = '') and (Value = '')) then
Line := KeyName + Strings.NameValueSeparator + Value
else
Line := '';
@ -832,8 +832,8 @@ begin
NewInd := Row - FixedRows;
end;
Result := NewInd;
NewCol := NewInd + FixedRows;
if (NewCol <> Col) then Col := NewCol;
NewRow := NewInd + FixedRows;
if (NewRow <> Row) then Row := NewRow;
end;
procedure TValueListEditor.InsertRowWithValues(Index: Integer;