Commit 61ebc020 authored by Frederik Gladhorn's avatar Frederik Gladhorn
Browse files

Fix pre-selected refresh rate

When we determine to show a refresh rate, it should rather be the
correct one. This was off by one.

Test Plan: Checked with my laptop display which used to wrongly display 47.99 Hz instead of 59.98

Reviewers: #plasma, broulik

Reviewed By: #plasma, broulik

Subscribers: plasma-devel

Tags: #plasma

Differential Revision:
parent 0597035f
......@@ -203,12 +203,12 @@ void OutputConfig::slotResolutionChanged(const QSize &size)
for (int i = 0, total = modes.count(); i < total; ++i) {
const KScreen::ModePtr mode =;
mRefreshRate->addItem(i18n("%1 Hz", QLocale().toString(mode->refreshRate(), 'f', 2)), mode->id());
// If selected refresh rate is other then what we consider the "Auto" value
// - that is it's not the highest resolution - then select it, otherwise
// we stick with "Auto"
if (mode == selectedMode && i > 1) {
// i + 1 since 0 is auto
mRefreshRate->setCurrentIndex(i + 1);
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