Commit 08ec9a03 authored by Bhushan Shah's avatar Bhushan Shah 📱
Browse files

Replace the excludeRange mode setting when already available

Summary:
Instead of appending a new entry.

BUG: 244857
BUG: 408415

Test Plan:
- remove fonts.conf
- start fonts kcm
- enable exclude range
- save
- see config is added only once
- modify config
- save
- see config is replaced and not added again
- disable exclude range
- save
- see config is totally removed.

Reviewers: fvogt

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D21748
parent fff556af
......@@ -760,7 +760,11 @@ void KXftConfig::applyExcludeRange(bool pixel)
if (!m_antiAliasing.node.isNull()) {
m_doc.documentElement().removeChild(range.node);
}
m_doc.documentElement().appendChild(matchNode);
if(range.node.isNull()) {
m_doc.documentElement().appendChild(matchNode);
} else {
m_doc.documentElement().replaceChild(matchNode, range.node);
}
range.node = matchNode;
}
}
......
Supports Markdown
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