mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-23 00:39:44 +02:00
LCL, fix commondialog under gtk2 insist on calling close twice
git-svn-id: trunk@32194 -
This commit is contained in:
parent
dc933c1466
commit
5b5134d710
@ -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);
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user