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;