Commit 49510194 authored by David Redondo's avatar David Redondo 🏎
Browse files

Do not read default values into the global config

Here we want to only include values if they are in the file.
The default values are applied in readInGlobalPartFromInfo.
parent 2322d5de
......@@ -51,11 +51,11 @@ static Output::GlobalConfig fromInfo(const KScreen::OutputPtr output, const QVar
{
Output::GlobalConfig config;
bool ok = false;
if (int rotation = info.value(QStringLiteral("rotation"), 1).toInt(&ok); ok) {
if (int rotation = info.value(QStringLiteral("rotation")).toInt(&ok); ok) {
config.rotation = static_cast<KScreen::Output::Rotation>(rotation);
}
if (qreal scale = info.value(QStringLiteral("scale"), 1.).toDouble(&ok); ok) {
if (qreal scale = info.value(QStringLiteral("scale")).toDouble(&ok); ok) {
config.scale = scale;
}
......
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