cc_frm correct scroll direction if more than 2 pages (thx dbo)

Signed-off-by: Thilo Graf <dbt@novatux.de>

picked from:
	github.com/TangoCash/neutrino-mp-cst-next
commit:
	abce1c6be4bae17f343d3ff878670184708aa185
This commit is contained in:
TangoCash
2016-12-06 11:29:11 +01:00
committed by Thilo Graf
parent bb895befef
commit 0c4c90bf2e

View File

@@ -636,9 +636,9 @@ void CComponentsForm::ScrollPage(int direction, bool do_paint)
int target_page_id = (int)page_count - 1;
int target_page = (int)cur_page;
if (direction == SCROLL_P_DOWN)
if (direction == SCROLL_P_UP)
target_page = target_page+1 > target_page_id ? 0 : target_page+1;
else if (direction == SCROLL_P_UP)
else if (direction == SCROLL_P_DOWN)
target_page = target_page-1 < 0 ? target_page_id : target_page-1;
if (do_paint)