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 - Mouse events within legend bounds ignored even when legend is not visible
Summary: Mouse events within legend bounds ignored even when legend is not visible
Status: RESOLVED FIXED
Alias: None
Product: VCL TeeChart
Classification: Unclassified
Component: Legend (show other bugs)
Version: 33.210915
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Steema Issue Manager
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-20 12:50 EDT by kevin.persons
Modified: 2023-03-15 13:03 EDT (History)
2 users (show)

See Also:
Chart Series: ---
Delphi / C++ Builder RAD IDE Version:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.