mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 06:29:29 +02:00
debugger: watches dialog:
- don't allow treeview editing - use action shortcuts (primary + secondary) instead of keydown handler git-svn-id: trunk@30753 -
This commit is contained in:
parent
65b111ae79
commit
214609b97a
@ -31,11 +31,11 @@ inherited WatchesDlg: TWatchesDlg
|
||||
end>
|
||||
MultiSelect = True
|
||||
PopupMenu = mnuPopup
|
||||
ReadOnly = True
|
||||
RowSelect = True
|
||||
TabOrder = 0
|
||||
ViewStyle = vsReport
|
||||
OnDblClick = lvWatchesDblClick
|
||||
OnKeyDown = lvWatchesKeyDown
|
||||
OnSelectItem = lvWatchesSelectItem
|
||||
end
|
||||
object ToolBar1: TToolBar[1]
|
||||
@ -162,6 +162,10 @@ inherited WatchesDlg: TWatchesDlg
|
||||
object actAddWatch: TAction
|
||||
Caption = 'actAddWatch'
|
||||
OnExecute = popAddClick
|
||||
SecondaryShortCuts.Strings = (
|
||||
'ins'
|
||||
)
|
||||
ShortCut = 16449
|
||||
end
|
||||
object actEnableSelected: TAction
|
||||
Caption = 'actEnableSelected'
|
||||
@ -174,6 +178,10 @@ inherited WatchesDlg: TWatchesDlg
|
||||
object actDeleteSelected: TAction
|
||||
Caption = 'actDeleteSelected'
|
||||
OnExecute = popDeleteClick
|
||||
SecondaryShortCuts.Strings = (
|
||||
'del'
|
||||
)
|
||||
ShortCut = 16452
|
||||
end
|
||||
object actEnableAll: TAction
|
||||
Caption = 'actEnableAll'
|
||||
@ -190,6 +198,10 @@ inherited WatchesDlg: TWatchesDlg
|
||||
object actProperties: TAction
|
||||
Caption = 'actProperties'
|
||||
OnExecute = popPropertiesClick
|
||||
SecondaryShortCuts.Strings = (
|
||||
'enter'
|
||||
)
|
||||
ShortCut = 16453
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -92,8 +92,6 @@ type
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
procedure FormShow(Sender: TObject);
|
||||
procedure lvWatchesDblClick(Sender: TObject);
|
||||
procedure lvWatchesKeyDown(Sender: TObject; var Key: Word;
|
||||
Shift: TShiftState);
|
||||
procedure lvWatchesSelectItem(Sender: TObject; AItem: TListItem; Selected: Boolean);
|
||||
procedure popAddClick(Sender: TObject);
|
||||
procedure popPropertiesClick(Sender: TObject);
|
||||
@ -524,21 +522,6 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TWatchesDlg.lvWatchesKeyDown(Sender: TObject; var Key: Word;
|
||||
Shift: TShiftState);
|
||||
begin
|
||||
if GetSelectedSnapshot <> nil then exit;
|
||||
case Key of
|
||||
//delete key pressed: delete selected item
|
||||
VK_DELETE: popDeleteClick(Sender);
|
||||
|
||||
//insert key pressed: add new item
|
||||
VK_INSERT: popAddClick(Sender);
|
||||
else
|
||||
inherited;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TWatchesDlg.popAddClick(Sender: TObject);
|
||||
begin
|
||||
try
|
||||
|
Loading…
Reference in New Issue
Block a user