fix encounter field slot change config limits
- add min and max value limits *before* setting value
This commit is contained in:
parent
029c4fddfc
commit
303cf37b48
1 changed files with 1 additions and 1 deletions
|
@ -338,9 +338,9 @@ void Editor::configureEncounterJSON() {
|
|||
QLabel *indexLabel = new QLabel(QString("Index: %1").arg(QString::number(index)));
|
||||
QSpinBox *chanceSpinner = new QSpinBox;
|
||||
int chance = currentField.second.at(index);
|
||||
chanceSpinner->setValue(chance);
|
||||
chanceSpinner->setMinimum(0);
|
||||
chanceSpinner->setMaximum(9999);
|
||||
chanceSpinner->setValue(chance);
|
||||
connect(chanceSpinner, QOverload<int>::of(&QSpinBox::valueChanged), [&chanceSpinner, &updateTotal, ¤tField](int) {
|
||||
updateTotal(currentField);
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue