prepare view provider for undo/redo
This commit is contained in:
@@ -30,17 +30,17 @@
|
||||
|
||||
#include "Document.h"
|
||||
#include "DocumentObject.h"
|
||||
#include "DocumentObjectPy.h"
|
||||
#include "DocumentObjectGroup.h"
|
||||
#include "PropertyLinks.h"
|
||||
#include "PropertyExpressionEngine.h"
|
||||
#include <App/DocumentObjectPy.h>
|
||||
#include <boost/signals/connection.hpp>
|
||||
#include <boost/bind.hpp>
|
||||
|
||||
using namespace App;
|
||||
|
||||
|
||||
PROPERTY_SOURCE(App::DocumentObject, App::PropertyContainer)
|
||||
PROPERTY_SOURCE(App::DocumentObject, App::TransactionalObject)
|
||||
|
||||
DocumentObjectExecReturn *DocumentObject::StdReturn = 0;
|
||||
|
||||
@@ -123,6 +123,18 @@ const char *DocumentObject::getNameInDocument(void) const
|
||||
return pcNameInDocument->c_str();
|
||||
}
|
||||
|
||||
bool DocumentObject::isAttachedToDocument() const
|
||||
{
|
||||
return (pcNameInDocument != 0);
|
||||
}
|
||||
|
||||
const char* DocumentObject::detachFromDocument()
|
||||
{
|
||||
const std::string* name = pcNameInDocument;
|
||||
pcNameInDocument = 0;
|
||||
return name ? name->c_str() : 0;
|
||||
}
|
||||
|
||||
std::vector<DocumentObject*> DocumentObject::getOutList(void) const
|
||||
{
|
||||
std::vector<Property*> List;
|
||||
@@ -231,7 +243,7 @@ void DocumentObject::onBeforeChange(const Property* prop)
|
||||
oldLabel = Label.getStrValue();
|
||||
|
||||
if (_pDoc)
|
||||
_pDoc->onBeforeChangeProperty(this,prop);
|
||||
onBeforeChangeProperty(_pDoc, prop);
|
||||
}
|
||||
|
||||
/// get called by the container when a Property was changed
|
||||
|
||||
Reference in New Issue
Block a user