diff --git a/objects/line_imp.h b/objects/line_imp.h --- a/objects/line_imp.h +++ b/objects/line_imp.h @@ -113,6 +113,7 @@ ObjectImp* property( int which, const KigDocument& d ) const Q_DECL_OVERRIDE; const char* iconForProperty( int which ) const Q_DECL_OVERRIDE; const ObjectImpType* impRequirementForProperty( int which ) const Q_DECL_OVERRIDE; + bool isPropertyDefinedOnOrThroughThisImp( int which ) const Q_DECL_OVERRIDE; SegmentImp* copy() const Q_DECL_OVERRIDE; @@ -168,6 +169,7 @@ ObjectImp* property( int which, const KigDocument& d ) const Q_DECL_OVERRIDE; const char* iconForProperty( int which ) const Q_DECL_OVERRIDE; const ObjectImpType* impRequirementForProperty( int which ) const Q_DECL_OVERRIDE; + bool isPropertyDefinedOnOrThroughThisImp( int which ) const Q_DECL_OVERRIDE; RayImp* copy() const Q_DECL_OVERRIDE; diff --git a/objects/line_imp.cc b/objects/line_imp.cc --- a/objects/line_imp.cc +++ b/objects/line_imp.cc @@ -633,12 +633,44 @@ return Parent::isPropertyDefinedOnOrThroughThisImp( which ); else if ( which == Parent::numberOfProperties() + pnum++ ) return false; + else if ( which == Parent::numberOfProperties() + pnum++ ) + return false; + else assert( false ); + return false; +} + +bool SegmentImp::isPropertyDefinedOnOrThroughThisImp( int which ) const +{ + int pnum = 0; + + if ( which < Parent::numberOfProperties() ) + return Parent::isPropertyDefinedOnOrThroughThisImp( which ); + else if ( which == Parent::numberOfProperties() + pnum++ ) + return false; + else if ( which == Parent::numberOfProperties() + pnum++ ) + return true; else if ( which == Parent::numberOfProperties() + pnum++ ) return true; else if ( which == Parent::numberOfProperties() + pnum++ ) return true; else if ( which == Parent::numberOfProperties() + pnum++ ) return true; + else if ( which == Parent::numberOfProperties() + pnum++ ) + return true; + else assert( false ); + return false; +} + +bool RayImp::isPropertyDefinedOnOrThroughThisImp( int which ) const +{ + int pnum = 0; + + if ( which < Parent::numberOfProperties() ) + return Parent::isPropertyDefinedOnOrThroughThisImp( which ); + else if ( which == Parent::numberOfProperties() + pnum++ ) + return true; + else if ( which == Parent::numberOfProperties() + pnum++ ) + return true; else assert( false ); return false; }