DrawLine class dragging bug

TeeChart for Java (NetBeans, Eclipse, Android Studio, etc)
Post Reply
Marian
Newbie
Newbie
Posts: 8
Joined: Tue Jan 29, 2008 12:00 am

DrawLine class dragging bug

Post by Marian » Wed Feb 13, 2008 3:58 pm

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

Marian
Newbie
Newbie
Posts: 8
Joined: Tue Jan 29, 2008 12:00 am

Post by Marian » Wed Feb 13, 2008 4:02 pm

the bug may be reproduced simply by running TeeChart.Features.jar Tools/Drawline and follow the steps I described above

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Feb 14, 2008 11:49 am

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.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Marc
Site Admin
Site Admin
Posts: 1258
Joined: Thu Oct 16, 2003 4:00 am
Location: Girona
Contact:

Post by Marc » Fri Feb 15, 2008 12:22 pm

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
Steema Support

Post Reply