add method to get view that contains a given node

This commit is contained in:
wmayer
2016-08-14 18:01:10 +02:00
parent 279531e89d
commit 554875b930
6 changed files with 31 additions and 7 deletions

View File

@@ -208,6 +208,13 @@ Gui::MDIView* ViewProviderDocumentObject::getInventorView() const
return mdi;
}
Gui::MDIView* ViewProviderDocumentObject::getViewOfNode(SoNode* node) const
{
App::Document* pAppDoc = pcObject->getDocument();
Gui::Document* pGuiDoc = Gui::Application::Instance->getDocument(pAppDoc);
return pGuiDoc->getViewOfNode(node);
}
SoNode* ViewProviderDocumentObject::findFrontRootOfType(const SoType& type) const
{
// first get the document this object is part of and get its GUI counterpart