mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-06 18:24:26 +08:00
Issue #1503: fix unsaved setup of columns in lists on object editors (table + routine editors effectively are the only ones with lists)
This commit is contained in:
@ -41,7 +41,7 @@ type
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
destructor Destroy; override;
|
||||
procedure Init(Obj: TDBObject); virtual;
|
||||
function DeInit: TModalResult;
|
||||
function DeInit: TModalResult; virtual;
|
||||
property Modified: Boolean read FModified write SetModified;
|
||||
function ApplyModifications: TModalResult; virtual; abstract;
|
||||
end;
|
||||
|
@ -62,7 +62,6 @@ type
|
||||
public
|
||||
{ Public declarations }
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
destructor Destroy; override;
|
||||
procedure Init(Obj: TDBObject); override;
|
||||
function ApplyModifications: TModalResult; override;
|
||||
end;
|
||||
@ -84,13 +83,6 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
destructor TfrmEventEditor.Destroy;
|
||||
begin
|
||||
// Store GUI setup? Nothing yet.
|
||||
inherited;
|
||||
end;
|
||||
|
||||
|
||||
procedure TfrmEventEditor.Init(Obj: TDBObject);
|
||||
var
|
||||
CreateCode, DateExpr: String;
|
||||
|
@ -85,8 +85,8 @@ type
|
||||
{ Public declarations }
|
||||
Parameters: TRoutineParamList;
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
destructor Destroy; override;
|
||||
procedure Init(Obj: TDBObject); override;
|
||||
function DeInit: TModalResult; override;
|
||||
function ApplyModifications: TModalResult; override;
|
||||
end;
|
||||
|
||||
@ -117,14 +117,6 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
destructor TfrmRoutineEditor.Destroy;
|
||||
begin
|
||||
// Store GUI setup
|
||||
TExtForm.SaveListSetup(listParameters);
|
||||
inherited;
|
||||
end;
|
||||
|
||||
|
||||
procedure TfrmRoutineEditor.Init(Obj: TDBObject);
|
||||
var
|
||||
i: Integer;
|
||||
@ -191,6 +183,14 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
function TfrmRoutineEditor.DeInit: TModalResult;
|
||||
begin
|
||||
// Store GUI setup
|
||||
TExtForm.SaveListSetup(listParameters);
|
||||
Result := inherited;
|
||||
end;
|
||||
|
||||
|
||||
procedure TfrmRoutineEditor.Modification(Sender: TObject);
|
||||
begin
|
||||
Modified := True;
|
||||
|
@ -225,8 +225,8 @@ type
|
||||
public
|
||||
{ Public declarations }
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
destructor Destroy; override;
|
||||
procedure Init(Obj: TDBObject); override;
|
||||
function DeInit: TModalResult; override;
|
||||
function ApplyModifications: TModalResult; override;
|
||||
end;
|
||||
|
||||
@ -255,17 +255,6 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
destructor TfrmTableEditor.Destroy;
|
||||
begin
|
||||
// Store GUI setup
|
||||
TExtForm.SaveListSetup(listColumns);
|
||||
TExtForm.SaveListSetup(treeIndexes);
|
||||
TExtForm.SaveListSetup(listForeignKeys);
|
||||
TExtForm.SaveListSetup(listCheckConstraints);
|
||||
inherited;
|
||||
end;
|
||||
|
||||
|
||||
procedure TfrmTableEditor.Init(Obj: TDBObject);
|
||||
var
|
||||
AttrName, AttrValue: String;
|
||||
@ -415,6 +404,17 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
function TfrmTableEditor.DeInit: TModalResult;
|
||||
begin
|
||||
// Store GUI setup
|
||||
TExtForm.SaveListSetup(listColumns);
|
||||
TExtForm.SaveListSetup(treeIndexes);
|
||||
TExtForm.SaveListSetup(listForeignKeys);
|
||||
TExtForm.SaveListSetup(listCheckConstraints);
|
||||
Result := inherited;
|
||||
end;
|
||||
|
||||
|
||||
procedure TfrmTableEditor.btnDiscardClick(Sender: TObject);
|
||||
begin
|
||||
// Reinit GUI, discarding changes
|
||||
|
Reference in New Issue
Block a user