Page 1 of 1

DrawLine class dragging bug

Posted: Wed Feb 13, 2008 3:58 pm
by 7667115
Hi,
I ran into a bug while using DrawLine class.
If I draw a line, then draw a new one and start dragging the previous one the newest one disappears.
I fixed the bug by changing the code in DrawLine.java, line 533:

if(tmp != null) {
repositionLine(tmp);
}

to this one:

if(tmp != null && selected == null) {
repositionLine(tmp);
}

This seems to fix the bug but I am not 100% sure if this is the right solution.

Marian

Posted: Wed Feb 13, 2008 4:02 pm
by 7667115
the bug may be reproduced simply by running TeeChart.Features.jar Tools/Drawline and follow the steps I described above

Posted: Thu Feb 14, 2008 11:49 am
by narcis
Hi Marian,

Thanks for reporting. I could reproduce the issue here and added it together with your fix suggestion (TJ71012818) to our defect list to be reviewed and fixed for next versions.

Posted: Fri Feb 15, 2008 12:22 pm
by Marc
Hello Marian,

Thanks for the suggestion, your workaround does the job. The error occurs because between mousedown, mousemove and mouseup the tmp (current line) should be being reset and it's not. We'll rewrite this a little to correct the state between line selections and put the fix into the next maintenance update.

Thanks again.
Regards,
Marc Meumann