App: fix property ordering problem when undo/redo (#3255)
* Part: fix Placement/Shape onChanged() handling * App: fix property ordering problem when undo/redo See https://tracker.freecadweb.org/view.php?id=4265#c14271 * Gui: fix undo/redo signaling Make sure to signal after all properties has been restored
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
#include "Property.h"
|
||||
#include "ObjectIdentifier.h"
|
||||
#include "PropertyContainer.h"
|
||||
#include "Transactions.h"
|
||||
#include <Base/Exception.h>
|
||||
#include <Base/Tools.h>
|
||||
#include "Application.h"
|
||||
@@ -58,7 +59,7 @@ Property::Property()
|
||||
|
||||
Property::~Property()
|
||||
{
|
||||
|
||||
Transaction::removePendingProperty(this);
|
||||
}
|
||||
|
||||
const char* Property::getName() const
|
||||
@@ -212,9 +213,14 @@ void Property::destroy(Property *p) {
|
||||
void Property::touch()
|
||||
{
|
||||
PropertyCleaner guard(this);
|
||||
if (father)
|
||||
father->onChanged(this);
|
||||
StatusBits.set(Touched);
|
||||
if (getName() && father && !Transaction::isApplying(this)) {
|
||||
father->onChanged(this);
|
||||
if(!testStatus(Busy)) {
|
||||
Base::BitsetLocker<decltype(StatusBits)> guard(StatusBits,Busy);
|
||||
signalChanged(*this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Property::setReadOnly(bool readOnly)
|
||||
@@ -224,15 +230,7 @@ void Property::setReadOnly(bool readOnly)
|
||||
|
||||
void Property::hasSetValue(void)
|
||||
{
|
||||
PropertyCleaner guard(this);
|
||||
if (father) {
|
||||
father->onChanged(this);
|
||||
if(!testStatus(Busy)) {
|
||||
Base::BitsetLocker<decltype(StatusBits)> guard(StatusBits,Busy);
|
||||
signalChanged(*this);
|
||||
}
|
||||
}
|
||||
StatusBits.set(Touched);
|
||||
touch();
|
||||
}
|
||||
|
||||
void Property::aboutToSetValue(void)
|
||||
|
||||
Reference in New Issue
Block a user