App: add signalChanged to Property

For more efficient tracking of single property changes
This commit is contained in:
Zheng, Lei
2019-10-23 07:22:33 +08:00
committed by Chris Hennes
parent 64053912b1
commit 9933d4fbce
2 changed files with 12 additions and 1 deletions

View File

@@ -32,6 +32,7 @@
#include "ObjectIdentifier.h"
#include "PropertyContainer.h"
#include <Base/Exception.h>
#include <Base/Tools.h>
#include "Application.h"
#include "DocumentObject.h"
@@ -212,8 +213,13 @@ void Property::setReadOnly(bool readOnly)
void Property::hasSetValue(void)
{
PropertyCleaner guard(this);
if (father)
if (father) {
father->onChanged(this);
if(!testStatus(Busy)) {
Base::BitsetLocker<decltype(StatusBits)> guard(StatusBits,Busy);
signalChanged(*this);
}
}
StatusBits.set(Touched);
}