+ playing in sandbox

This commit is contained in:
wmayer
2013-07-05 15:31:54 +02:00
parent 609072f140
commit 93f38c114b
4 changed files with 53 additions and 5 deletions

View File

@@ -160,6 +160,25 @@ protected:
const AbstractCallable& callable;
};
class CustomPurgeEvent : public AbstractCustomProtectorEvent
{
public:
CustomPurgeEvent(App::DocumentObject* o)
: obj(o)
{
}
~CustomPurgeEvent()
{
}
void execute()
{
obj->purgeTouched();
}
protected:
App::DocumentObject* obj;
};
class DocumentReceiver : public QObject
{
public:
@@ -324,3 +343,8 @@ void DocumentObjectProtector::execute(const AbstractCallable& call)
DocumentReceiver::globalInstance()->postEventAndWait(new CustomCallableEvent(call));
}
void DocumentObjectProtector::purgeTouched()
{
validate();
DocumentReceiver::globalInstance()->postEventAndWait(new CustomPurgeEvent(obj));
}