Page 1 of 1

//Bug Report [+solution] TMapSeries.onClick

Posted: Tue Dec 09, 2008 2:59 am
by 9334475
I am working with TMapSeries drawing numerous balloons on the chart. I noticed that if some of the top shapes are made invisible, then they are still clickable, which is wrong, as they obstruct underlying shape objects.

Please find below corrected code for Clicked(..) function. Please note that while this code is for TeeChart 7.12, TC8.x still has this bug (can see it in Tee8new.exe).

regards,
odissey1

Code: Select all


// Tee Bug with TMapSeries (clicked invisible polygons)
// TeeChart 7.12->


unit TeeMapSeries;
...

function TMapSeries.Clicked(x, y: Integer): Integer;
var tmpClip : Boolean;
    tmpRect : TRect;

  function IsShapeVisible(Shape:TPolygonSeries):Boolean;
  var tmp  : Integer;
      tmp2 : Integer;
  begin

//correction->
//or:    if not Shape.Polygon.Points.Visible then begin
    if not Shape.Visible then begin
       result:=False;
       Exit;
    end;
//<-correction

    if tmpClip then
     ...
     ...
     ...
    end
    else result:=True;
end;
  

Posted: Tue Dec 09, 2008 12:24 pm
by narcis
Hi odissey,

Thanks for your suggestion. I've added it to the wish-list to be considered for inclusion in future releases.