Commit 0b8ef770 authored by Bhushan Shah's avatar Bhushan Shah 📱
Browse files

kcm/fonts: Do not load image preview before loading settings

Summary:
The way image preview works is it tries to actually "set" and then
"reset" the original value to render the text.

However if we don't have default or user set settings loaded, it will
reset it back to "NotSet" in end instead of user set value and this is
not what we want.

Test Plan:
this alone is not enough to make kcm save subpixel properly
but this is part of patch series

Reviewers: davidedmundson

Reviewed By: davidedmundson

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D25090
parent 92b4eacc
......@@ -555,11 +555,19 @@ void KFonts::setNearestExistingFonts()
void KFonts::load()
{
// first load all the settings
m_settings->load();
m_fontAASettings->load();
// Then set the existing fonts based on those settings
setNearestExistingFonts();
// Load preview
// NOTE: This needs to be done AFTER AA settings is loaded
// otherwise AA settings will be resetted in process of loading
// previews
engine()->addImageProvider("preview", new PreviewImageProvider(m_settings->font()));
m_fontAASettings->load();
setNeedsSave(false);
}
......
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