Commit a69379e8 authored by Thomas Zander's avatar Thomas Zander

Fixes: moving anchored frames

Details: Instead of making *any* shape non-editable when its parent is locked, we make the (parents) container
    model decide on this with the default implementation disallowing any moving if any parent is non-editable.
    The KoTextContainerModel has its proposeMove() now called again.

svn path=/trunk/koffice/; revision=925564
parent 5e465739
......@@ -754,14 +754,8 @@ bool KoShape::isEditable() const
if (!d->visible || d->locked)
return false;
KoShapeContainer * p = parent();
if (p && p->isChildLocked(this))
if (d->parent && d->parent->isChildLocked(this))
return false;
while (p) {
if (! p->isEditable())
return false;
p = p->parent();
}
return true;
}
......
......@@ -37,6 +37,18 @@ public:
Relation *r = new Relation(child);
m_relations.append(r);
}
void proposeMove(KoShape *shape, QPointF &move) {
KoShapeContainer *parent = shape->parent();
bool allowedToMove = true;
while (allowedToMove && parent) {
allowedToMove = parent->isEditable();
parent = parent->parent();
}
if (! allowedToMove) {
move.setX(0);
move.setY(0);
}
}
void setClipping(const KoShape *child, bool clipping) {
Relation *relation = findRelation(child);
......
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