mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-11 11:59:23 +02:00
Merge branch 'Cody/Dictionary/RightClick' into 'main'
Cody/Dictionary: Select an item with a right mouse click See merge request freepascal.org/lazarus/lazarus!508
This commit is contained in:
commit
1de4c81f7a
@ -1050,6 +1050,11 @@ procedure TCodyIdentifiersDlg.ItemsListBoxContextPopup(Sender: TObject;
|
||||
var
|
||||
Identifier, UnitFilename, GroupName, GroupFilename: string;
|
||||
begin
|
||||
// when calling the menu from keyboard, the MousePos is (-1;-1)
|
||||
if not InvalidPoint(MousePos) then
|
||||
// select item under mouse
|
||||
ItemsListBox.ItemIndex := ItemsListBox.ItemAtPos(MousePos, true);
|
||||
|
||||
// show popup menu only if valid identificator is selected
|
||||
Handled := not FindSelectedItem(Identifier, UnitFilename, GroupName, GroupFilename);
|
||||
if Handled then exit;
|
||||
|
Loading…
Reference in New Issue
Block a user