LCL, fix commondialog under gtk2 insist on calling close twice

git-svn-id: trunk@32194 -
This commit is contained in:
jesus 2011-09-06 16:29:43 +00:00
parent dc933c1466
commit 5b5134d710
2 changed files with 4 additions and 1 deletions

View File

@ -71,6 +71,7 @@ type
FUserChoice: integer;
FHelpContext: THelpContext;
FCanCloseCalled: Boolean;
FClosing: boolean;
procedure SetHandle(const AValue: THandle);
procedure SetHeight(const AValue: integer);
procedure SetWidth(const AValue: integer);

View File

@ -40,10 +40,12 @@ end;
procedure TCommonDialog.Close;
begin
if HandleAllocated then begin
if HandleAllocated and not FClosing then begin
FClosing := true;
DoClose;
TWSCommonDialogClass(WidgetSetClass).DestroyHandle(Self);
FHandle := 0;
FClosing := false;
end;
end;