TTreeNodeShape.Clicked Bug

TeeTree VCL for Borland Delphi and C++ Builder.
Post Reply
Hans Hasenack
Newbie
Newbie
Posts: 31
Joined: Thu Feb 22, 2007 12:00 am
Location: Nijmegen, Netherlands
Contact:

TTreeNodeShape.Clicked Bug

Post by Hans Hasenack » Tue Mar 06, 2007 10:25 am

When tree has scrolled, and image is clicked the wrong shape is selected.

This is because
TTreeNodeShape.Clicked
calls Tree.Canvas.Calculate2DPosition

which changes the X/Y variables.

Later on TTreeNodeShape.ClickedImage is called with these modified XY pairs, and this one calls Tree.Canvas.Calculate2DPosition once more, resulting in a faulty selection.

(I had to patch this in TeeTree.pas, TTreeNodeShape.Clicked )

tom
Advanced
Posts: 211
Joined: Mon Dec 01, 2003 5:00 am
Contact:

Post by tom » Sun Mar 11, 2007 6:24 pm


Hans Hasenack
Newbie
Newbie
Posts: 31
Joined: Thu Feb 22, 2007 12:00 am
Location: Nijmegen, Netherlands
Contact:

Just the way I patched it.

Post by Hans Hasenack » Mon Mar 12, 2007 7:29 am

Why didn't you change it in the TeeTree sourcecode? I downloaded it jan 2007, and your message is of 2004 .. :shock:

tom
Advanced
Posts: 211
Joined: Mon Dec 01, 2003 5:00 am
Contact:

Post by tom » Mon Mar 12, 2007 10:59 am

Message of 2004? It's of Dec 2006.

It's included in our cvs-tree, so it will be fixed in the next release of teeChart PRO.

Which version have you downloaded?

Hans Hasenack
Newbie
Newbie
Posts: 31
Joined: Thu Feb 22, 2007 12:00 am
Location: Nijmegen, Netherlands
Contact:

Definitely

Post by Hans Hasenack » Mon Mar 12, 2007 11:17 am

Yep. I fixed it (very old code) by making DoDraw virtual and in the overriden routine not call inherited whilst loading nodes from the database.

Your solution is much cleaner - thanks. :D

Hans Hasenack
Newbie
Newbie
Posts: 31
Joined: Thu Feb 22, 2007 12:00 am
Location: Nijmegen, Netherlands
Contact:

Ignore my last reply

Post by Hans Hasenack » Thu Mar 15, 2007 3:42 pm

It was meant for the BeginUpdate/Endupdate thread.

So the question remains... Why not fix it NOW (it is a bug, not a new feature)
:roll:

tom
Advanced
Posts: 211
Joined: Mon Dec 01, 2003 5:00 am
Contact:

Post by tom » Fri Mar 16, 2007 11:40 am

Hans,

I'm sorry, I can't follow anymore...

1) The Begin/End Update solves your question regarding your other post?

2) Is the click issue, solved with the patch as posted on dec 2006, http://www.teechart.net/support/viewtopic.php?t=5260 ?

All patches are entered in the CVS, so they are included in the next update version of teeChart PRO, which is version 7.08

If 1) and/or 2) don't solve your problem, please restate your question, so we can start with a fresh mind

Regards,
Tom.

Hans Hasenack
Newbie
Newbie
Posts: 31
Joined: Thu Feb 22, 2007 12:00 am
Location: Nijmegen, Netherlands
Contact:

LOL I get it now

Post by Hans Hasenack » Fri Mar 16, 2007 12:46 pm

:idea:

While you lost it, I found it!
:lol:

Just for a moment I assumed CVS-Tree was your next teeTree product, instead of your version control system.

So I wondered why not fix it, which was exactly what you're doing!

Hahahahans

Post Reply