refs #581 CValueCachePacket contains an inhibitions list that can be used to disable specific notification slots.

This commit is contained in:
Mathew Sutcliffe
2016-02-04 00:57:40 +00:00
parent c1d3e2aabb
commit bc2e0faa36
2 changed files with 13 additions and 5 deletions

View File

@@ -467,7 +467,7 @@ namespace BlackMisc
QList<NotifySlot> notifySlots;
forEachIntersection(m_elements, values, [changedBy, this, &notifySlots, &values](const QString &, const ElementPtr &element, CValueCachePacket::const_iterator it)
forEachIntersection(m_elements, values, [changedBy, this, &notifySlots, &values](const QString &key, const ElementPtr &element, CValueCachePacket::const_iterator it)
{
if (changedBy == this) // round trip
{
@@ -482,7 +482,10 @@ namespace BlackMisc
element->m_value.uniqueWrite() = it.value();
element->m_timestamp = it.timestamp();
element->m_saved = values.isSaved();
if (element->m_notifySlot && ! notifySlots.contains(element->m_notifySlot)) { notifySlots.push_back(element->m_notifySlot); }
if (element->m_notifySlot && ! notifySlots.contains(element->m_notifySlot) && ! values.isInhibited(parent(), key))
{
notifySlots.push_back(element->m_notifySlot);
}
}
else
{