Skip to content

Commit

Permalink
for restored view providers of a redo again call handleChildren3D() t…
Browse files Browse the repository at this point in the history
…o update scene graph
  • Loading branch information
wwmayer committed Nov 29, 2019
1 parent 73aa2a2 commit bf4bf62
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Gui/Document.cpp
Expand Up @@ -104,6 +104,7 @@ struct DocumentP
std::map<const App::DocumentObject*,ViewProviderDocumentObject*> _ViewProviderMap;
std::map<SoSeparator *,ViewProviderDocumentObject*> _CoinMap;
std::map<std::string,ViewProvider*> _ViewProviderMapAnnotation;
std::list<ViewProviderDocumentObject*> _redoViewProviders;

typedef boost::signals2::connection Connection;
Connection connectNewObject;
Expand Down Expand Up @@ -690,6 +691,9 @@ void Document::slotNewObject(const App::DocumentObject& Obj)

// it is possible that a new viewprovider already claims children
handleChildren3D(pcProvider);
if (d->_isTransacting) {
d->_redoViewProviders.push_back(pcProvider);
}
}
}

Expand Down Expand Up @@ -2152,6 +2156,10 @@ void Document::redo(int iSteps)
getDocument()->redo();
}
App::GetApplication().signalRedo();

for (auto it : d->_redoViewProviders)
handleChildren3D(it);
d->_redoViewProviders.clear();
}

PyObject* Document::getPyObject(void)
Expand Down

0 comments on commit bf4bf62

Please sign in to comment.