Commit d941a3c8 authored by Thomas Zander's avatar Thomas Zander

Add this method to KoShape so everyone can ask the shape if its editable

in a recursive way.

svn path=/trunk/koffice/; revision=743754
parent 1e79306d
......@@ -622,6 +622,22 @@ void KoShape::deleteLater() {
new ShapeDeleter(this);
}
bool KoShape::isEditable() const {
if( !d->visible || d->locked )
return false;
KoShapeContainer * p = parent();
if(p && p->isChildLocked(this))
return false;
while( p )
{
if( ! p->isVisible() )
return false;
p = p->parent();
}
return true;
}
// loading & saving methods
void KoShape::saveOdfConnections(KoShapeSavingContext &context) const {
......
......@@ -614,6 +614,9 @@ public:
*/
void deleteLater();
/// checks recursively if the shape or one of its parents is not visible or locked
bool isEditable() const;
protected:
/* ** loading saving helper methods */
......
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