Fix bug 1643: Projections are always added to the first drawing page

This commit is contained in:
Michael G. Hansen
2014-08-19 15:07:02 +02:00
committed by wmayer
parent d5870525ff
commit 784e52ddb6
2 changed files with 13 additions and 11 deletions

View File

@@ -858,7 +858,10 @@ TaskOrthoViews::TaskOrthoViews(QWidget *parent)
const char * part = obj.front()->getNameInDocument();
App::Document * doc = App::GetApplication().getActiveDocument();
vector<App::DocumentObject*> pages = doc->getObjectsOfType(Drawing::FeaturePage::getClassTypeId());
vector<App::DocumentObject*> pages = Gui::Selection().getObjectsOfType(Drawing::FeaturePage::getClassTypeId());
if (pages.empty()) {
pages = doc->getObjectsOfType(Drawing::FeaturePage::getClassTypeId());
}
string PageName = pages.front()->getNameInDocument();
const char * page = PageName.c_str();