+Add method to get mdi view by view provider, add method to get flag widgets

This commit is contained in:
wmayer
2013-11-22 15:14:15 +01:00
parent ac93eae55b
commit 85f4a35b61
4 changed files with 34 additions and 0 deletions

View File

@@ -1111,6 +1111,19 @@ MDIView* Document::getActiveView(void) const
return active;
}
Gui::MDIView* Document::getViewOfViewProvider(Gui::ViewProvider* vp) const
{
std::list<MDIView*> mdis = getMDIViews();
for (std::list<MDIView*>::const_iterator it = mdis.begin(); it != mdis.end(); ++it) {
if ((*it)->getTypeId().isDerivedFrom(View3DInventor::getClassTypeId())) {
View3DInventor* view = static_cast<View3DInventor*>(*it);
if (view->getViewer()->hasViewProvider(vp))
return *it;
}
}
return 0;
}
//--------------------------------------------------------------------------
// UNDO REDO transaction handling