fixed unintialized value for escape and default on msg dialogs

git-svn-id: trunk@9759 -
This commit is contained in:
mattias 2006-08-28 09:40:22 +00:00
parent 358af7d5d7
commit ed5392befa

View File

@ -60,10 +60,14 @@ begin
Result := mrAll Result := mrAll
else else
If mbYesToAll in Buttons then If mbYesToAll in Buttons then
Result := mrYesToAll; Result := mrYesToAll
else
Result:=mrCancel;
end; end;
Function ModalDefaultButton(Buttons : TMsgDlgButtons) : TMsgDlgbtn; Function ModalDefaultButton(Buttons : TMsgDlgButtons) : TMsgDlgbtn;
var
b: TMsgDlgBtn;
begin begin
If mbYes in Buttons then If mbYes in Buttons then
Result := mbYes Result := mbYes
@ -93,7 +97,12 @@ begin
Result := mbAbort Result := mbAbort
else else
If mbIgnore in Buttons then If mbIgnore in Buttons then
Result := mbIgnore; Result := mbIgnore
else begin
for b:=Low(TMsgDlgBtn) to High(TMsgDlgBtn) do
if b in Buttons then
Result:=b;
end;
end; end;
const const