Skip to content

Commit 81f457c

Browse files
committed
Improved the performance of OnMouseOver() by taking into account the value of IsHitTestVisible property of Overlays.
1 parent 7c5d059 commit 81f457c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

GMap.NET/GMap.NET.WindowsForms/GMapControl.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1976,7 +1976,7 @@ protected override void OnMouseClick(MouseEventArgs e)
19761976
{
19771977
var o = Overlays[i];
19781978

1979-
if (o != null && o.IsVisibile)
1979+
if (o != null && o.IsVisibile && o.IsHitTestVisible)
19801980
{
19811981
foreach (var m in o.Markers)
19821982
{
@@ -2060,7 +2060,7 @@ protected override void OnMouseDoubleClick(MouseEventArgs e)
20602060
{
20612061
var o = Overlays[i];
20622062

2063-
if (o != null && o.IsVisibile)
2063+
if (o != null && o.IsVisibile && o.IsHitTestVisible)
20642064
{
20652065
foreach (var m in o.Markers)
20662066
{
@@ -2245,7 +2245,7 @@ protected override void OnMouseMove(MouseEventArgs e)
22452245
for (int i = Overlays.Count - 1; i >= 0; i--)
22462246
{
22472247
var o = Overlays[i];
2248-
if (o != null && o.IsVisibile)
2248+
if (o != null && o.IsVisibile && o.IsHitTestVisible)
22492249
{
22502250
foreach (var m in o.Markers)
22512251
{

0 commit comments

Comments
 (0)