From ed5392befa562c9269b95f28b96afa681ce78866 Mon Sep 17 00:00:00 2001 From: mattias Date: Mon, 28 Aug 2006 09:40:22 +0000 Subject: [PATCH] fixed unintialized value for escape and default on msg dialogs git-svn-id: trunk@9759 - --- lcl/include/messagedialogs.inc | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/lcl/include/messagedialogs.inc b/lcl/include/messagedialogs.inc index 8da293e45a..2b5fa6824a 100644 --- a/lcl/include/messagedialogs.inc +++ b/lcl/include/messagedialogs.inc @@ -60,10 +60,14 @@ begin Result := mrAll else If mbYesToAll in Buttons then - Result := mrYesToAll; + Result := mrYesToAll + else + Result:=mrCancel; end; Function ModalDefaultButton(Buttons : TMsgDlgButtons) : TMsgDlgbtn; +var + b: TMsgDlgBtn; begin If mbYes in Buttons then Result := mbYes @@ -93,7 +97,12 @@ begin Result := mbAbort else 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; const