mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-29 06:10:58 +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;
|
FUserChoice: integer;
|
||||||
FHelpContext: THelpContext;
|
FHelpContext: THelpContext;
|
||||||
FCanCloseCalled: Boolean;
|
FCanCloseCalled: Boolean;
|
||||||
|
FClosing: boolean;
|
||||||
procedure SetHandle(const AValue: THandle);
|
procedure SetHandle(const AValue: THandle);
|
||||||
procedure SetHeight(const AValue: integer);
|
procedure SetHeight(const AValue: integer);
|
||||||
procedure SetWidth(const AValue: integer);
|
procedure SetWidth(const AValue: integer);
|
||||||
|
@ -40,10 +40,12 @@ end;
|
|||||||
|
|
||||||
procedure TCommonDialog.Close;
|
procedure TCommonDialog.Close;
|
||||||
begin
|
begin
|
||||||
if HandleAllocated then begin
|
if HandleAllocated and not FClosing then begin
|
||||||
|
FClosing := true;
|
||||||
DoClose;
|
DoClose;
|
||||||
TWSCommonDialogClass(WidgetSetClass).DestroyHandle(Self);
|
TWSCommonDialogClass(WidgetSetClass).DestroyHandle(Self);
|
||||||
FHandle := 0;
|
FHandle := 0;
|
||||||
|
FClosing := false;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user