Skip to content

Commit 7c2870a

Browse files
committed
fix: some trees have their own OnContextMenu logic set at design time, do not overwrite
Refs #2271
1 parent 2030a91 commit 7c2870a

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

source/apphelpers.pas

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1520,7 +1520,9 @@ procedure FixVT(VT: TVirtualStringTree; IsResultGrid: Boolean=False);
15201520
VT.OnStartOperation := Mainform.AnyGridStartOperation;
15211521
VT.OnEndOperation := Mainform.AnyGridEndOperation;
15221522
VT.BorderStyle := bsNone; // Cosmetic
1523-
VT.OnContextPopup := MainForm.AnyGridContextPopup;
1523+
// Some trees have their own OnContextMenu logic set at design time:
1524+
if not Assigned(VT.OnContextPopup) then
1525+
VT.OnContextPopup := MainForm.AnyGridContextPopup;
15241526
end;
15251527

15261528

source/main.lfm

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2136,7 +2136,6 @@ object MainForm: TMainForm
21362136
OnBeforePaint = ListTablesBeforePaint
21372137
OnChange = ListTablesChange
21382138
OnCompareNodes = AnyGridCompareNodes
2139-
OnContextPopup = AnyGridContextPopup
21402139
OnDblClick = ListTablesDblClick
21412140
OnEditing = ListTablesEditing
21422141
OnGetText = ListTablesGetText

0 commit comments

Comments
 (0)