6.5.2021, 9:00 - 11:00: Due to updates GitLab may be unavailable for some minutes between 09:00 and 11:00.

reverted changes from e7b11bfa: "added s_changed signal of properties also...

reverted changes from e7b11bfa: "added s_changed signal of properties also being propagated to its shared properties"
This was weak design and lead to problems with the AutoEvaluationPipeline.
parent 2704211f
......@@ -43,6 +43,7 @@ namespace campvis {
}
AbstractProperty::~AbstractProperty() {
}
const std::string& AbstractProperty::getName() {
......@@ -63,11 +64,11 @@ namespace campvis {
void AbstractProperty::addSharedProperty(AbstractProperty* prop) {
tgtAssert(prop != 0, "Shared property must not be 0!");
tgtAssert(prop != this, "Shared property must not be this!");
tgtAssert(typeid(this) == typeid(prop), "Shared property must be of the same type as this property.");
tbb::spin_mutex::scoped_lock lock(_localMutex);
_sharedProperties.insert(prop);
s_changed.connect(this, &AbstractProperty::onChanged);
}
void AbstractProperty::removeSharedProperty(AbstractProperty* prop) {
......@@ -105,11 +106,4 @@ namespace campvis {
s_visibilityChanged(this);
}
void AbstractProperty::onChanged(const AbstractProperty* prop) {
//tbb::spin_mutex::scoped_lock lock(_localMutex);
for (std::set<AbstractProperty*>::iterator it = _sharedProperties.begin(); it != _sharedProperties.end(); ++it) {
(*it)->s_changed(prop);
}
}
}
......@@ -154,8 +154,6 @@ namespace campvis {
sigslot::signal1<const AbstractProperty*> s_visibilityChanged;
protected:
void onChanged(const AbstractProperty* prop);
// DO NOT REMOVE THE CONSTNESS OF _name. PropertyCollection relies on it!
const std::string _name; ///< Property name (unchangable on purpose!)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment