Follow up to r4266, issue #3051: Fix selection of the right routine type, based on the itemindex, not the combo box text.

This commit is contained in:
Ansgar Becker
2012-12-09 09:42:19 +00:00
parent b29e24b5d4
commit fcc6ffee5b
2 changed files with 4 additions and 22 deletions

View File

@ -158,7 +158,10 @@ begin
SynMemoBody.Text := 'BEGIN'+CRLF+CRLF+'END';
if DBObject.Name <> '' then begin
// Editing existing routine
comboType.ItemIndex := ListIndexByRegExpr(comboType.Items, '^'+FAlterRoutineType+'\b');
case Obj.NodeType of
lntProcedure: comboType.ItemIndex := 0;
lntFunction: comboType.ItemIndex := 1;
end;
DBObject.Connection.ParseRoutineStructure(Obj.CreateCode, Parameters, Deterministic, Definer, Returns, DataAccess, Security, Comment, Body);
comboReturns.Text := Returns;
chkDeterministic.Checked := Deterministic;