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