From d467aa5554a59417b59e54afc405367ec29deb17 Mon Sep 17 00:00:00 2001 From: maxim Date: Thu, 26 May 2016 13:28:45 +0000 Subject: [PATCH] POChecker: show popup menu in Graphical Statistics form only on right mouse button click git-svn-id: trunk@52392 - --- components/pochecker/graphstat.pp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/components/pochecker/graphstat.pp b/components/pochecker/graphstat.pp index fdcd7f70d3..081c8c5d2c 100644 --- a/components/pochecker/graphstat.pp +++ b/components/pochecker/graphstat.pp @@ -151,14 +151,17 @@ var AStat: TStat; CurrScreenPoint: TPoint; begin - anItem := Listview.GetItemAt(X, Y); - if Assigned(anItem) then + if Button = mbRight then begin - anIndex := anItem.Index; - AStat := FPoFamilyStats.Items[anIndex]; - Fn := AStat.PoName; - CurrScreenPoint := ListView.ClientToScreen(Point(X, Y)); - ContextPopupMenu.PopUp(CurrScreenPoint.X, CurrScreenPoint.Y); + anItem := Listview.GetItemAt(X, Y); + if Assigned(anItem) then + begin + anIndex := anItem.Index; + AStat := FPoFamilyStats.Items[anIndex]; + Fn := AStat.PoName; + CurrScreenPoint := ListView.ClientToScreen(Point(X, Y)); + ContextPopupMenu.PopUp(CurrScreenPoint.X, CurrScreenPoint.Y); + end; end; end;