Commit 9765d7ac authored by Jan Hambrecht's avatar Jan Hambrecht

notify dependent shapes if a shape was deleted


svn path=/trunk/koffice/; revision=757450
parent 2d9e9d46
......@@ -451,8 +451,16 @@ void KoConnectionShape::shapeChanged(ChangeType type)
}
}
void KoConnectionShape::notifyShapeChanged( KoShape *, ChangeType )
void KoConnectionShape::notifyShapeChanged( KoShape * shape, ChangeType type )
{
if( type == KoShape::Deleted )
{
if( shape == d->shape1 )
setConnection1( 0, -1 );
else if( shape == d->shape2 )
setConnection2( 0, -1 );
}
if( isParametricShape() )
updateConnections();
}
......@@ -137,6 +137,7 @@ KoShape::KoShape()
KoShape::~KoShape()
{
d->shapeChanged( Deleted );
delete d;
}
......
......@@ -106,7 +106,8 @@ public:
SizeChanged, ///< used after a setSize()
GenericMatrixChange, ///< used after the matrix was changed without knowing which property explicitly changed
ParentChanged, ///< used after a setParent()
CollisionDetected ///< used when another shape moved in our boundingrect
CollisionDetected, ///< used when another shape moved in our boundingrect
Deleted ///< the shape was deleted
};
/**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment