mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-06 18:24:26 +08:00
Do not recycle field editor form, fixes bug #870 :AV on "Edit column" after reconnection
This commit is contained in:
@ -88,6 +88,7 @@ type
|
||||
procedure listClick(Sender: TObject);
|
||||
procedure comboDefaultChange(Sender: TObject);
|
||||
procedure FormResize(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
private
|
||||
{ Private declarations }
|
||||
TempKeys : TStringList;
|
||||
@ -123,7 +124,6 @@ uses
|
||||
|
||||
var
|
||||
klist : Array of TMysqlIndex;
|
||||
FieldEditForm : TFieldEditForm;
|
||||
|
||||
{$R *.DFM}
|
||||
|
||||
@ -133,9 +133,10 @@ var
|
||||
Create form
|
||||
}
|
||||
function FieldEditorWindow (AOwner : TComponent; AMode : TFieldEditorMode; AFieldName : WideString = '') : Boolean;
|
||||
var
|
||||
FieldEditForm : TFieldEditForm;
|
||||
begin
|
||||
if FieldEditForm = nil then
|
||||
FieldEditForm := TFieldEditForm.Create(AOwner);
|
||||
FieldEditForm := TFieldEditForm.Create(AOwner);
|
||||
FieldEditForm.FMode := AMode;
|
||||
// Also remember original mode for restoring when switching pagecontrol tabs
|
||||
FieldEditForm.FModeWhenCalled := AMode;
|
||||
@ -165,6 +166,15 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
{**
|
||||
FormClose - don't recycle this form, see bug #870
|
||||
}
|
||||
procedure TFieldEditForm.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
Action := caFree;
|
||||
end;
|
||||
|
||||
|
||||
{***
|
||||
Init Field-Editor
|
||||
}
|
||||
|
Reference in New Issue
Block a user