Fix small styling issues in previous 2 commits

This commit is contained in:
Cătălin Răceanu
2019-02-21 08:19:02 +02:00
parent 0a1846eb9a
commit 7588ed0cf4

View File

@@ -43,17 +43,17 @@ void wxQtSpinButton::valueChanged(int value)
void wxQtSpinButton::stepBy(int steps) void wxQtSpinButton::stepBy(int steps)
{ {
wxSpinButton* handler = GetHandler(); wxSpinButton* const handler = GetHandler();
if ( !handler ) if ( !handler )
return; return;
int eventType = (steps < 0) ? wxEVT_SPIN_DOWN : wxEVT_SPIN_UP; int eventType = steps < 0 ? wxEVT_SPIN_DOWN : wxEVT_SPIN_UP;
wxSpinEvent directionEvent(eventType, handler->GetId()); wxSpinEvent directionEvent(eventType, handler->GetId());
directionEvent.SetPosition(value()); directionEvent.SetPosition(value());
directionEvent.SetInt(value() + steps * singleStep()); directionEvent.SetInt(value() + steps * singleStep());
directionEvent.SetEventObject(handler); directionEvent.SetEventObject(handler);
handler->HandleWindowEvent(directionEvent); // should return value be checked here? handler->HandleWindowEvent(directionEvent);
if ( directionEvent.IsAllowed() ) if ( directionEvent.IsAllowed() )
{ {