mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-26 20:00:16 +08:00
VirtualTree's internal text edit link has the bad habit of passing keyboard actions to its parent tree. Use our own editor instead which doesn't do that. Fixes issue #1297.
This commit is contained in:
@ -104,6 +104,7 @@ object connform: Tconnform
|
||||
TreeOptions.MiscOptions = [toAcceptOLEDrop, toEditable, toFullRepaintOnResize, toInitOnSave, toToggleOnDblClick, toWheelPanning, toEditOnClick]
|
||||
TreeOptions.PaintOptions = [toHotTrack, toShowButtons, toShowDropmark, toThemeAware, toUseBlendedImages, toUseExplorerTheme, toHideTreeLinesIfThemed]
|
||||
TreeOptions.SelectionOptions = [toFullRowSelect, toRightClickSelect]
|
||||
OnCreateEditor = ListSessionsCreateEditor
|
||||
OnDblClick = btnOpenClick
|
||||
OnFocusChanged = ListSessionsFocusChanged
|
||||
OnFocusChanging = ListSessionsFocusChanging
|
||||
|
@ -76,6 +76,8 @@ type
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure TimerStatisticsTimer(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure ListSessionsCreateEditor(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex;
|
||||
out EditLink: IVTEditLink);
|
||||
private
|
||||
{ Private declarations }
|
||||
FLoaded: Boolean;
|
||||
@ -96,7 +98,7 @@ type
|
||||
|
||||
|
||||
implementation
|
||||
uses Main, helpers, MysqlQueryThread;
|
||||
uses Main, helpers, MysqlQueryThread, grideditlinks;
|
||||
|
||||
{$I const.inc}
|
||||
|
||||
@ -339,6 +341,14 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
procedure Tconnform.ListSessionsCreateEditor(Sender: TBaseVirtualTree; Node: PVirtualNode;
|
||||
Column: TColumnIndex; out EditLink: IVTEditLink);
|
||||
begin
|
||||
// Use our own text editor to rename a session
|
||||
EditLink := TInplaceEditorLink.Create(Sender as TVirtualStringTree);
|
||||
end;
|
||||
|
||||
|
||||
procedure Tconnform.ListSessionsFocusChanged(Sender: TBaseVirtualTree;
|
||||
Node: PVirtualNode; Column: TColumnIndex);
|
||||
var
|
||||
|
Reference in New Issue
Block a user