From 151caf049c95368347a6243e85e04a50c87d0e5e Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Mon, 12 Oct 2015 13:22:12 +0200 Subject: Fix missing 'direction' type changes (int to enum). --- plugingui/listboxbasic.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'plugingui/listboxbasic.cc') diff --git a/plugingui/listboxbasic.cc b/plugingui/listboxbasic.cc index 4e57807..2aae943 100644 --- a/plugingui/listboxbasic.cc +++ b/plugingui/listboxbasic.cc @@ -195,7 +195,7 @@ void ListBoxBasic::scrollEvent(ScrollEvent *e) void ListBoxBasic::keyEvent(KeyEvent *e) { - if(e->direction != -1) + if(e->direction != KeyEvent::Up) { return; } @@ -279,7 +279,7 @@ void ListBoxBasic::buttonEvent(ButtonEvent *e) { if(e->y > 0 && e->y < btn_size) { - if(e->direction == -1) + if(e->direction == ButtonEvent::Up) { return; } @@ -289,7 +289,7 @@ void ListBoxBasic::buttonEvent(ButtonEvent *e) if(e->y > ((int)height() - btn_size) && e->y < ((int)height() - 1)) { - if(e->direction == -1) + if(e->direction == ButtonEvent::Up) { return; } @@ -298,7 +298,7 @@ void ListBoxBasic::buttonEvent(ButtonEvent *e) } } - if(e->direction == -1) + if(e->direction == ButtonEvent::Up) { int skip = scroll.value(); size_t yoffset = padding / 2; @@ -317,7 +317,7 @@ void ListBoxBasic::buttonEvent(ButtonEvent *e) repaintEvent(nullptr); } - if(e->direction != -1) + if(e->direction != ButtonEvent::Up) { int skip = scroll.value(); size_t yoffset = padding / 2; -- cgit v1.2.3