[TD]apply review comments from @chennes
- also delete empty execute method
This commit is contained in:
@@ -97,7 +97,7 @@ void DrawSVGTemplate::onChanged(const App::Property* prop)
|
||||
}
|
||||
|
||||
//parse the Svg code, inserting current EditableTexts values, and return the result as a QString.
|
||||
//While parsing, not the Orientation, Width and Height values in the Svg code.
|
||||
//While parsing, note the Orientation, Width and Height values in the Svg code.
|
||||
QString DrawSVGTemplate::processTemplate()
|
||||
{
|
||||
// Base::Console().Message("DSVGT::processTemplate() - isRestoring: %d\n", isRestoring());
|
||||
|
||||
@@ -80,23 +80,7 @@ double DrawTemplate::getHeight() const
|
||||
return Height.getValue();
|
||||
}
|
||||
|
||||
App::DocumentObjectExecReturn *DrawTemplate::execute()
|
||||
{
|
||||
// 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 = dynamic_cast<TechDraw::DrawPage *>(*it);
|
||||
// }
|
||||
// }
|
||||
|
||||
// if(page) {
|
||||
// page->Template.touch();
|
||||
// }
|
||||
|
||||
return App::DocumentObject::execute();
|
||||
}
|
||||
|
||||
//find the (first) DrawPage which points to this template
|
||||
DrawPage* DrawTemplate::getParentPage() const
|
||||
{
|
||||
TechDraw::DrawPage* page(nullptr);
|
||||
@@ -104,6 +88,7 @@ DrawPage* DrawTemplate::getParentPage() const
|
||||
for (auto& obj : parents) {
|
||||
if (obj->getTypeId().isDerivedFrom(DrawPage::getClassTypeId())) {
|
||||
page = static_cast<TechDraw::DrawPage *>(obj);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return page;
|
||||
|
||||
@@ -50,7 +50,6 @@ public:
|
||||
App::PropertyMap EditableTexts;
|
||||
|
||||
public:
|
||||
|
||||
/// Returns template width in mm
|
||||
virtual double getWidth() const;
|
||||
/// Returns template height in mm
|
||||
@@ -58,13 +57,6 @@ public:
|
||||
|
||||
virtual DrawPage* getParentPage() const;
|
||||
|
||||
/** @name methods override Feature */
|
||||
//@{
|
||||
/// recalculate the Feature
|
||||
App::DocumentObjectExecReturn *execute(void) override;
|
||||
//@}
|
||||
|
||||
|
||||
/// returns the type name of the ViewProvider
|
||||
const char* getViewProviderName(void) const override{
|
||||
return "TechDrawGui::ViewProviderTemplate";
|
||||
|
||||
Reference in New Issue
Block a user