Commit 711e962d authored by Agata Cacko's avatar Agata Cacko

Fix update brush size using shortcuts or drag

Before this commit, brush size slider wasn't updated.
This patch fixes this behaviour.

Looks like at the same time m_resources *doesn't* contain
a specific key while m_updateMediators does and needs
this connectResource thing.
The key in question is 6007 with KisPaintOpPresetSP value,
which means it's "CurrentPaintOpPreset".

This probably needs some more investigation. This fix will hide
the issue for users though. It is based on revert of the commit
7c2fce1d.

BUG:408331
parent fada19f1
......@@ -54,22 +54,25 @@ void KoResourceManager::setResource(int key, const QVariant &value)
m_resources[sourceKey] = newSourceValue;
notifyResourceChanged(sourceKey, newSourceValue);
}
} else if (m_resources.contains(key)) {
} else if (m_resources.contains(key)) {
const QVariant oldValue = m_resources.value(key, QVariant());
m_resources[key] = value;
if (m_updateMediators.contains(key)) {
m_updateMediators[key]->connectResource(value);
}
if (oldValue != value) {
notifyResourceChanged(key, value);
}
}
else {
} else {
m_resources[key] = value;
if (m_updateMediators.contains(key)) {
m_updateMediators[key]->connectResource(value);
}
notifyResourceChanged(key, value);
}
}
void KoResourceManager::notifyResourceChanged(int key, const QVariant &value)
......
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