Commit 5b445f0d authored by Thomas Zander's avatar Thomas Zander

Simplify code a bit.

Tests still run.

svn path=/trunk/koffice/; revision=954442
parent 02998a88
......@@ -391,7 +391,7 @@ void KoShape::setParent(KoShapeContainer *parent)
d->parent = 0; // avoids recursive removing
if (oldParent)
oldParent->removeChild(this);
if (parent && dynamic_cast<KoShape*>(parent) != this) {
if (parent && parent != this) {
d->parent = parent;
parent->addChild(this);
}
......
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