[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    koffice/plugins/chartshape/kdchart/src
From:       Dag Andersen <danders () get2net ! dk>
Date:       2010-06-29 11:59:43
Message-ID: 20100629120830.914E7AC8E0 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1144117 by danders:

Do not crash when a plane is removed, and this plane is refrenced to by another plane.


 M  +2 -4      KDChartChart.cpp  


--- trunk/koffice/plugins/chartshape/kdchart/src/KDChartChart.cpp #1144116:1144117
@@ -91,6 +91,7 @@
 
 void Chart::Private::slotUnregisterDestroyedPlane( AbstractCoordinatePlane* plane )
 {
+    plane->setReferenceCoordinatePlane(0);
     coordinatePlanes.removeAll( plane );
     Q_FOREACH ( AbstractCoordinatePlane* p, coordinatePlanes )
     {
@@ -961,13 +962,10 @@
 {
     const int idx = d->coordinatePlanes.indexOf( plane );
     if( idx != -1 ){
-        d->coordinatePlanes.takeAt( idx );
         disconnect( plane, SIGNAL( destroyedCoordinatePlane( AbstractCoordinatePlane* ) ),
                     d, SLOT( slotUnregisterDestroyedPlane( AbstractCoordinatePlane* ) ) );
-        plane->removeFromParentLayout();
-        plane->setParent( 0 );
+        d->slotUnregisterDestroyedPlane( plane );
     }
-    d->slotLayoutPlanes();
     // Need to emit the signal: In case somebody has connected the signal
     // to her own slot for e.g. calling update() on a widget containing the chart.
     emit propertiesChanged();
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic