mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-12 12:54:29 +00:00
Ensure that the 'Text width' box in the Icon view settings page is always set to a valid entry initially.
svn path=/trunk/KDE/kdebase/apps/; revision=650484
This commit is contained in:
parent
52c3d5a222
commit
3993f38294
|
@ -37,6 +37,7 @@
|
|||
#include <QPushButton>
|
||||
#include <QSpinBox>
|
||||
#include <QGridLayout>
|
||||
#include <QtDebug>
|
||||
|
||||
IconsViewSettingsPage::IconsViewSettingsPage(DolphinMainWindow* mainWindow,
|
||||
QWidget* parent) :
|
||||
|
@ -99,6 +100,9 @@ IconsViewSettingsPage::IconsViewSettingsPage(DolphinMainWindow* mainWindow,
|
|||
else {
|
||||
textWidthIndex = (remainingWidth - TopToBottomBase) / TopToBottomInc;
|
||||
}
|
||||
// ensure that chosen index is always valid
|
||||
textWidthIndex = qMax(textWidthIndex,0);
|
||||
textWidthIndex = qMin(textWidthIndex,m_textWidthBox->count()-1);
|
||||
|
||||
m_textWidthBox->setCurrentIndex(textWidthIndex);
|
||||
|
||||
|
|
Loading…
Reference in a new issue