fix(lua): numberEdit getter and prevent fillTriangle crash (#7288)
This commit is contained in:
@@ -300,3 +300,15 @@ void NumberEdit::setValue(int value)
|
||||
updateDisplay();
|
||||
if (edit) edit->update();
|
||||
}
|
||||
|
||||
void NumberEdit::checkEvents()
|
||||
{
|
||||
if (_getValue) {
|
||||
int newValue = _getValue();
|
||||
if (newValue != currentValue) {
|
||||
currentValue = newValue;
|
||||
updateDisplay();
|
||||
}
|
||||
}
|
||||
TextButton::checkEvents();
|
||||
}
|
||||
|
||||
@@ -120,4 +120,6 @@ class NumberEdit : public TextButton
|
||||
|
||||
void updateDisplay();
|
||||
void openEdit();
|
||||
|
||||
void checkEvents() override;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user