mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-14 01:56:36 +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 listClick(Sender: TObject);
|
||||||
procedure comboDefaultChange(Sender: TObject);
|
procedure comboDefaultChange(Sender: TObject);
|
||||||
procedure FormResize(Sender: TObject);
|
procedure FormResize(Sender: TObject);
|
||||||
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||||
private
|
private
|
||||||
{ Private declarations }
|
{ Private declarations }
|
||||||
TempKeys : TStringList;
|
TempKeys : TStringList;
|
||||||
@ -123,7 +124,6 @@ uses
|
|||||||
|
|
||||||
var
|
var
|
||||||
klist : Array of TMysqlIndex;
|
klist : Array of TMysqlIndex;
|
||||||
FieldEditForm : TFieldEditForm;
|
|
||||||
|
|
||||||
{$R *.DFM}
|
{$R *.DFM}
|
||||||
|
|
||||||
@ -133,9 +133,10 @@ var
|
|||||||
Create form
|
Create form
|
||||||
}
|
}
|
||||||
function FieldEditorWindow (AOwner : TComponent; AMode : TFieldEditorMode; AFieldName : WideString = '') : Boolean;
|
function FieldEditorWindow (AOwner : TComponent; AMode : TFieldEditorMode; AFieldName : WideString = '') : Boolean;
|
||||||
|
var
|
||||||
|
FieldEditForm : TFieldEditForm;
|
||||||
begin
|
begin
|
||||||
if FieldEditForm = nil then
|
FieldEditForm := TFieldEditForm.Create(AOwner);
|
||||||
FieldEditForm := TFieldEditForm.Create(AOwner);
|
|
||||||
FieldEditForm.FMode := AMode;
|
FieldEditForm.FMode := AMode;
|
||||||
// Also remember original mode for restoring when switching pagecontrol tabs
|
// Also remember original mode for restoring when switching pagecontrol tabs
|
||||||
FieldEditForm.FModeWhenCalled := AMode;
|
FieldEditForm.FModeWhenCalled := AMode;
|
||||||
@ -165,6 +166,15 @@ begin
|
|||||||
end;
|
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
|
Init Field-Editor
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user