+ fix order of removed objects in transaction list
+ add assert to check for obvious error + removed unneeded method
This commit is contained in:
@@ -575,16 +575,16 @@ void Document::slotRedoDocument(const App::Document& doc)
|
||||
|
||||
void Document::addViewProvider(Gui::ViewProviderDocumentObject* vp)
|
||||
{
|
||||
// Hint: The undo/redo first adds the view provider to the Gui
|
||||
// document before adding the objects to the App document.
|
||||
|
||||
// the view provider is added by TransactionViewProvider and an
|
||||
// object can be there only once
|
||||
assert(d->_ViewProviderMap.find(vp->getObject()) == d->_ViewProviderMap.end());
|
||||
vp->setStatus(Detach, false);
|
||||
d->_ViewProviderMap[vp->getObject()] = vp;
|
||||
}
|
||||
|
||||
void Document::removeViewProvider(Gui::ViewProviderDocumentObject* vp)
|
||||
{
|
||||
vp->setStatus(Detach, true);
|
||||
d->_ViewProviderMap.erase(vp->getObject());
|
||||
}
|
||||
|
||||
void Document::setModified(bool b)
|
||||
{
|
||||
d->_isModified = b;
|
||||
|
||||
Reference in New Issue
Block a user