Correct condition check for vetoed events

This commit is contained in:
Cătălin Răceanu
2019-02-21 19:48:45 +02:00
parent 7588ed0cf4
commit 1af2b7f05a

View File

@@ -53,9 +53,7 @@ void wxQtSpinButton::stepBy(int steps)
directionEvent.SetInt(value() + steps * singleStep());
directionEvent.SetEventObject(handler);
handler->HandleWindowEvent(directionEvent);
if ( directionEvent.IsAllowed() )
if ( !handler->HandleWindowEvent(directionEvent) || directionEvent.IsAllowed() )
{
QSpinBox::stepBy(steps);
}