mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-01-12 15:59:58 -05:00
Fix/database settings spin box bug (#9101)
Co-authored-by: jNullj <jNullj@users.noreply.github.com>
This commit is contained in:
parent
5bd871528f
commit
20e8e524a5
@ -50,14 +50,16 @@ void DatabaseSettingsWidgetGeneral::initialize()
|
|||||||
m_ui->historyMaxItemsCheckBox->setChecked(true);
|
m_ui->historyMaxItemsCheckBox->setChecked(true);
|
||||||
} else {
|
} else {
|
||||||
m_ui->historyMaxItemsSpinBox->setValue(Metadata::DefaultHistoryMaxItems);
|
m_ui->historyMaxItemsSpinBox->setValue(Metadata::DefaultHistoryMaxItems);
|
||||||
|
m_ui->historyMaxItemsSpinBox->setEnabled(false);
|
||||||
m_ui->historyMaxItemsCheckBox->setChecked(false);
|
m_ui->historyMaxItemsCheckBox->setChecked(false);
|
||||||
}
|
}
|
||||||
int historyMaxSizeMiB = qRound(meta->historyMaxSize() / qreal(1048576));
|
int historyMaxSizeMiB = qRound(meta->historyMaxSize() / qreal(1024 * 1024));
|
||||||
if (historyMaxSizeMiB > 0) {
|
if (historyMaxSizeMiB > 0) {
|
||||||
m_ui->historyMaxSizeSpinBox->setValue(historyMaxSizeMiB);
|
m_ui->historyMaxSizeSpinBox->setValue(historyMaxSizeMiB);
|
||||||
m_ui->historyMaxSizeCheckBox->setChecked(true);
|
m_ui->historyMaxSizeCheckBox->setChecked(true);
|
||||||
} else {
|
} else {
|
||||||
m_ui->historyMaxSizeSpinBox->setValue(Metadata::DefaultHistoryMaxSize);
|
m_ui->historyMaxSizeSpinBox->setValue(qRound(Metadata::DefaultHistoryMaxSize / qreal(1024 * 1024)));
|
||||||
|
m_ui->historyMaxSizeSpinBox->setEnabled(false);
|
||||||
m_ui->historyMaxSizeCheckBox->setChecked(false);
|
m_ui->historyMaxSizeCheckBox->setChecked(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user