Steema Issues Database

Note: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;
otherwise you can use StackOverflow.
Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy.



Bug 2522

Summary: Mouse events within legend bounds ignored even when legend is not visible
Product: VCL TeeChart Reporter: kevin.persons
Component: LegendAssignee: Steema Issue Manager <issuemanager>
Status: RESOLVED FIXED    
Severity: normal CC: david, yeray
Priority: ---    
Version: 33.210915   
Target Milestone: ---   
Hardware: PC   
OS: Windows   
Chart Series: --- Delphi / C++ Builder RAD IDE Version:

Description kevin.persons 2022-04-20 12:50:40 EDT
The TCustomChartLegend.Clicked function does not consider whether the legend is visible when calculating its return value. As a result, when TCustomChart.MouseMove calls Legend.Clicked to determine a legend item hover status, the subsequent events that should be called by CheckMouseSeries do not fire in the case where the invisible legend occupies the same screen area as the hovered chart series. The fix I've applied to my copy of the source is to change the following line in TCustomChartLegend.Clicked from:
   if PointInRect(GetLegendBounds,P) then  
to:
   if Visible and PointInRect(GetLegendBounds,P) then
That seems to work for me, but maybe there are side effects that I haven't considered. Thanks.
Comment 1 david berneda 2023-03-15 13:03:33 EDT
Thank you very much, this is now fixed according to your "if Visible..." solution.
That check was missing.
Comment 2 david berneda 2023-03-15 13:03:50 EDT
Don't think it comes with any undesired side effect.