Fix DrawProjGroup Positioning

- DrawPage was not including DPG in list of all
  views, so DPG was not being positioned properly.
This commit is contained in:
wandererfan
2018-05-15 20:05:41 -04:00
parent 6f61c21e3c
commit 765709ddcf

View File

@@ -347,14 +347,13 @@ std::vector<App::DocumentObject*> DrawPage::getAllViews(void)
auto views = Views.getValues(); //list of docObjects
std::vector<App::DocumentObject*> allViews;
for (auto& v: views) {
allViews.push_back(v);
if (v->isDerivedFrom(TechDraw::DrawProjGroup::getClassTypeId())) {
TechDraw::DrawProjGroup* dpg = static_cast<TechDraw::DrawProjGroup*>(v);
if (dpg != nullptr) { //can't really happen!
std::vector<App::DocumentObject*> pgViews = dpg->Views.getValues();
allViews.insert(allViews.end(),pgViews.begin(),pgViews.end());
}
} else {
allViews.push_back(v);
}
}
return allViews;