mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-26 20:00:16 +08:00
Add <Select All> and <Copy> menu items to SQL code memos. Fixes issue #1530.
This commit is contained in:
@ -644,6 +644,7 @@ object frmTableEditor: TfrmTableEditor
|
||||
Font.Height = -13
|
||||
Font.Name = 'Courier New'
|
||||
Font.Style = []
|
||||
PopupMenu = popupSQLmemo
|
||||
TabOrder = 0
|
||||
Gutter.AutoSize = True
|
||||
Gutter.DigitCount = 2
|
||||
@ -675,6 +676,7 @@ object frmTableEditor: TfrmTableEditor
|
||||
Font.Height = -13
|
||||
Font.Name = 'Courier New'
|
||||
Font.Style = []
|
||||
PopupMenu = popupSQLmemo
|
||||
TabOrder = 0
|
||||
Gutter.AutoSize = True
|
||||
Gutter.DigitCount = 2
|
||||
@ -840,4 +842,16 @@ object frmTableEditor: TfrmTableEditor
|
||||
ImageIndex = 13
|
||||
end
|
||||
end
|
||||
object popupSQLmemo: TPopupMenu
|
||||
Images = MainForm.PngImageListMain
|
||||
OnPopup = popupSQLmemoPopup
|
||||
Left = 376
|
||||
Top = 360
|
||||
object menuSQLSelectAll: TMenuItem
|
||||
Action = MainForm.actSelectAll
|
||||
end
|
||||
object menuSQLCopy: TMenuItem
|
||||
Action = MainForm.actCopy
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -84,6 +84,9 @@ type
|
||||
lblNoForeignKeys: TLabel;
|
||||
menuCopyColumnCell: TMenuItem;
|
||||
N2: TMenuItem;
|
||||
popupSQLmemo: TPopupMenu;
|
||||
menuSQLCopy: TMenuItem;
|
||||
menuSQLSelectAll: TMenuItem;
|
||||
procedure editNameChange(Sender: TObject);
|
||||
procedure Modification(Sender: TObject);
|
||||
procedure btnAddColumnClick(Sender: TObject);
|
||||
@ -167,6 +170,7 @@ type
|
||||
var InitialStates: TVirtualNodeInitStates);
|
||||
procedure listColumnsGetNodeDataSize(Sender: TBaseVirtualTree; var NodeDataSize: Integer);
|
||||
procedure listColumnsNodeMoved(Sender: TBaseVirtualTree; Node: PVirtualNode);
|
||||
procedure popupSQLmemoPopup(Sender: TObject);
|
||||
private
|
||||
{ Private declarations }
|
||||
FLoaded: Boolean;
|
||||
@ -2079,4 +2083,14 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
procedure TfrmTableEditor.popupSQLmemoPopup(Sender: TObject);
|
||||
var
|
||||
m: TPopupMenu;
|
||||
begin
|
||||
// Ensure SynMemo's have focus, otherwise Select-All and Copy actions may fail
|
||||
m := Sender as TPopupMenu;
|
||||
TWinControl(m.PopupComponent).SetFocus;
|
||||
end;
|
||||
|
||||
|
||||
end.
|
||||
|
Reference in New Issue
Block a user