dont remove already removed view providers from the toplevel inventor node

This commit is contained in:
Stefan Tröger 2013-09-24 18:21:45 +00:00
parent f007608c81
commit 14b3246974

View File

@ -514,6 +514,10 @@ void Document::slotChangedObject(const App::DocumentObject& Obj, const App::Prop
if (activeView && viewProvider) {
if (d->_editViewProvider == ChildViewProvider)
resetEdit();
//remove the viewprovider serves the purpose of detaching the inventor nodes from the
//top level root in the viewer. However, if some of the children were grouped beneath the object
//earlier they are not anymore part of the toplevel inventor node. we need to check for that.
if(activeView->getViewer()->hasViewProvider(ChildViewProvider))
activeView->getViewer()->removeViewProvider(ChildViewProvider);
}
}