Commit 24edd898 authored by Thorbjørn Lindeijer's avatar Thorbjørn Lindeijer
Browse files

Fixed option dialog not selecting smallest font size

It was refusing to stay at index 0.

Task-number: QTCREATORBUG-2472
Reviewed-by: Erik Verbruggen
parent 0cb92276
......@@ -383,14 +383,14 @@ void FontSettingsPage::updatePointSizes()
d_ptr->ui.sizeComboBox->clear();
}
const QList<int> sizeLst = pointSizesForSelectedFont();
int idx = 0;
int idx = -1;
int i = 0;
for (; i < sizeLst.count(); ++i) {
if (idx == 0 && sizeLst.at(i) >= oldSize)
if (idx == -1 && sizeLst.at(i) >= oldSize)
idx = i;
d_ptr->ui.sizeComboBox->addItem(QString::number(sizeLst.at(i)));
}
if (d_ptr->ui.sizeComboBox->count())
if (idx != -1)
d_ptr->ui.sizeComboBox->setCurrentIndex(idx);
}
......
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