Bug 253165 - Moving legends in layout mode crashes kst2
Summary: Moving legends in layout mode crashes kst2
Status: RESOLVED FIXED
Alias: None
Product: kst
Classification: Applications
Component: general (show other bugs)
Version: 2.0.1
Platform: Compiled Sources Linux
: HI crash
Target Milestone: 2.0.1
Assignee: kst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-03 22:49 UTC by Nicolas Brisset
Modified: 2010-11-12 10:37 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Brisset 2010-10-03 22:49:27 UTC
Version:           2.0.1
OS:                Linux

There is a bug in the code handling view items (at least legends), which seem to be attached to the wrong parent at the end of the move event, which finally results in a crash.

Reproducible: Always

Steps to Reproduce:
- load all 3 colums from gyrodata.dat, each in its plot and with legends displayed
- move to layout mode
- click on the legend of the second plot and drag it a few pixels below: it jumps to the third plot!
- drag it up to plot #2: it comes back to plot #3
- drag it again to plot #2: crash!


Expected Results:  
The view item (legend) should stay in the right plot and kst should not crash!

I have tried with a few different view objects (label, rectangle) and the problem happens with all of them.
Comment 1 Peter Kümmel 2010-10-04 21:44:30 UTC
SVN commit 1182510 by kuemmel:

Fix crash: items have a new QGraphicsItem as parent not a new QObject (here a tab page)

CCBUG: 253165

 M  +2 -2      viewitem.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1182510
Comment 2 Netterfield 2010-10-22 03:37:14 UTC
SVN commit 1188329 by netterfield:

BUG: 253165

Drop events are handled by the scene, which works in scene coordinates.  This was confusing the
GraphicsItems which work in their parent's coordinates.  Hence, meyhem.

This fix just converts the drop event back into parental coordinates in the viewitem.

I think this changed when d&d was being implemented to fix 258885.



 M  +8 -2      viewitem.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1188329
Comment 3 Nicolas Brisset 2010-10-22 07:55:59 UTC
Cool :-) It works much better now!
Thanks.

We should discuss what we still need to do (if anything) before releasing 2.0.1.
Comment 4 Peter Kümmel 2010-11-12 10:37:17 UTC
There is no version list for "Version Fixed in".
Use Target Milestone as indicator when the bug was fixed.