Page 1 of 1

TTreeNodeShape.Clicked Bug

Posted: Tue Mar 06, 2007 10:25 am
by 9349350
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 )

Posted: Sun Mar 11, 2007 6:24 pm
by Tom

Just the way I patched it.

Posted: Mon Mar 12, 2007 7:29 am
by 9349350
Why didn't you change it in the TeeTree sourcecode? I downloaded it jan 2007, and your message is of 2004 .. :shock:

Posted: Mon Mar 12, 2007 10:59 am
by Tom
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?

Definitely

Posted: Mon Mar 12, 2007 11:17 am
by 9349350
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

Ignore my last reply

Posted: Thu Mar 15, 2007 3:42 pm
by 9349350
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:

Posted: Fri Mar 16, 2007 11:40 am
by Tom
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.

LOL I get it now

Posted: Fri Mar 16, 2007 12:46 pm
by 9349350
: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