mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-14 01:56:36 +08:00
Code cosmetic in "Insert files" dialog:
* Make sure the INSERT query is fired within a try/except block, and keep form open on any error * Reasonably rename some component names * Remove InsertFilesWindow(), instead cache the instance of InsertFiles in main form, like it is for most other dialogs * Get rid of a with .. do block * Ger rid of a weird form pointer, instead use the "Owner" property
This commit is contained in:
@ -22,7 +22,7 @@ uses
|
||||
createdatabase, table_editor, SynRegExpr,
|
||||
WideStrUtils, ExtActns, CommCtrl, routine_editor, options,
|
||||
Contnrs, PngSpeedButton, connections, SynEditKeyCmds,
|
||||
mysql_connection, mysql_api;
|
||||
mysql_connection, mysql_api, insertfiles;
|
||||
|
||||
|
||||
type
|
||||
@ -791,6 +791,7 @@ type
|
||||
prefNullBG : TColor;
|
||||
CreateDatabaseForm : TCreateDatabaseForm;
|
||||
TableEditor : TfrmTableEditor;
|
||||
InsertFiles : TfrmInsertFiles;
|
||||
FDataGridSelect : TWideStringList;
|
||||
FDataGridSort : TOrderColArray;
|
||||
DataGridCurrentSelect,
|
||||
@ -899,7 +900,7 @@ const
|
||||
implementation
|
||||
|
||||
uses
|
||||
About, loaddata, printlist, copytable, insertfiles,
|
||||
About, loaddata, printlist, copytable,
|
||||
mysql_structures, UpdateCheck, uVistaFuncs, runsqlfile, column_selection,
|
||||
data_sorting, grideditlinks, dataviewsave;
|
||||
|
||||
@ -2164,7 +2165,9 @@ end;
|
||||
|
||||
procedure TMainForm.actInsertFilesExecute(Sender: TObject);
|
||||
begin
|
||||
InsertFilesWindow(Self);
|
||||
if not Assigned(InsertFiles) then
|
||||
InsertFiles := TfrmInsertFiles.Create(Self);
|
||||
InsertFiles.ShowModal;
|
||||
end;
|
||||
|
||||
// Drop Table(s)
|
||||
|
Reference in New Issue
Block a user