Bug 126998

Summary: curveplacement widget does not update correctly when curves are deleted
Product: [Applications] kst Reporter: Duncan Hanson <duncan.hanson>
Component: generalAssignee: kst
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 1.x   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:

Description Duncan Hanson 2006-05-09 02:29:53 UTC
Version:            (using KDE KDE 3.5.0)
Installed from:    Compiled From Sources
OS:                Linux

curveplacement widget does not update correctly when curves are deleted

STEPS TO REPRODUCE:

1. create two plots.
2. open one of the new 'curve' creation dialogs (eg. new equation, curve, etc.)
3. select the 'Place in existing plot' radio toggle of the Placement section. Note which plot is the default to be used.
4. click cancel, then delete the default plot from step 3.
5. try to create a new curve, note that the default plot which has just been deleted is still an option for placement.

RESULT:
the default plot which has just been deleted is still an option for placement.

EXPECTED BEHAVIOUR:
a new default is chosen, the deleted plot is removed from the plot list.
Comment 1 George Staikos 2006-05-09 13:44:27 UTC
SVN commit 538945 by staikos:

Update the plot list properly
BUG: 126998


 M  +1 -1      curveplacementwidget.ui.h  


--- trunk/extragear/graphics/kst/src/widgets/curveplacementwidget.ui.h #538944:538945
@@ -85,7 +85,7 @@
 	_plotList->insertItem(*i);
     }
 
-    if (!old.isNull() && _plotList->count() > 0) {
+    if (!old.isNull() && plots.contains(old)) {
 	_plotList->setCurrentText(old);
     }
 }