--Boundary-00=_ASIIMwiFigXwC4+ Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Tirsdag 22 juni 2010 10:07:48 skrev Dag Andersen: > If a cooridateplane that is refrenced by another coordinatepalne is removed > from the chart, I get the following assert: > ASSERT: "planeLayout" in file > /opt.kde/src/kdesvn/koffice/plugins/chartshape/kdchart/src/KDChartChart.cpp > , line 509 > > So atm the user app is required to setReferenceCoordinatePlane( 0 ) before > the referenced plane is removed. > The patch makes it safe to remove a plane that references another plane. This patch wasn't enough, new patch follows. The plane that *is* removed also needs to have 0 refrence plane. (Haven't figuered out why) -- Mvh. Dag Andersen --Boundary-00=_ASIIMwiFigXwC4+ Content-Type: text/x-patch; charset="UTF-8"; name="crash.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="crash.diff" Index: KDChartChart.cpp =================================================================== --- KDChartChart.cpp (revision 1140071) +++ KDChartChart.cpp (working copy) @@ -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(); --Boundary-00=_ASIIMwiFigXwC4+ Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ koffice-devel mailing list koffice-devel@kde.org https://mail.kde.org/mailman/listinfo/koffice-devel --Boundary-00=_ASIIMwiFigXwC4+--