From 1af2b7f05a3af45796924ad7664609d44b69e030 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C4=83t=C4=83lin=20R=C4=83ceanu?= Date: Thu, 21 Feb 2019 19:48:45 +0200 Subject: [PATCH] Correct condition check for vetoed events --- src/qt/spinbutt.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/qt/spinbutt.cpp b/src/qt/spinbutt.cpp index bca7ea658e..7ae3c303fb 100644 --- a/src/qt/spinbutt.cpp +++ b/src/qt/spinbutt.cpp @@ -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); }