mirror of
https://github.com/huderlem/porymap.git
synced 2026-07-02 00:02:04 -05:00
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
|
|
@ -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 New Issue
Block a user