mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-06 18:24:26 +08:00
Focus new node in parameters list after clicking "Add". Also, add new parameters at the focused tree position. See http://www.heidisql.com/forum.php?t=11132.
This commit is contained in:
@ -215,14 +215,20 @@ end;
|
||||
procedure TfrmRoutineEditor.btnAddParamClick(Sender: TObject);
|
||||
var
|
||||
Param: TRoutineParam;
|
||||
Position: Integer;
|
||||
begin
|
||||
Param := TRoutineParam.Create;
|
||||
Param.Name := 'Param'+IntToStr(Parameters.Count+1);
|
||||
Param.Datatype := 'INT';
|
||||
Param.Context := 'IN';
|
||||
Parameters.Add(Param);
|
||||
if Assigned(listParameters.FocusedNode) then
|
||||
Position := listParameters.FocusedNode.Index+1
|
||||
else
|
||||
Position := Parameters.Count;
|
||||
Parameters.Insert(Position, Param);
|
||||
// See List.OnPaint:
|
||||
listParameters.Repaint;
|
||||
SelectNode(listParameters, Position);
|
||||
Modification(Sender);
|
||||
end;
|
||||
|
||||
|
Reference in New Issue
Block a user