Fix issue 53 Drawing templates

This commit is contained in:
WandererFan
2016-06-04 18:11:51 -04:00
committed by wmayer
parent eeaa39f270
commit 44f3a1a21e
17 changed files with 2298 additions and 20 deletions

View File

@@ -131,6 +131,18 @@ void DrawTemplate::getBlockDimensions(double &x, double &y, double &width, doubl
throw Base::Exception("implement in virtual function");
}
DrawPage* DrawTemplate::getParentPage() const
{
TechDraw::DrawPage* page = nullptr;
std::vector<App::DocumentObject*> parent = getInList();
for (std::vector<App::DocumentObject*>::iterator it = parent.begin(); it != parent.end(); ++it) {
if ((*it)->getTypeId().isDerivedFrom(DrawPage::getClassTypeId())) {
page = static_cast<TechDraw::DrawPage *>(*it);
}
}
return page;
}
// Python Template feature ---------------------------------------------------------
namespace App {