diff --git a/src/gui/components/cc_frm.cpp b/src/gui/components/cc_frm.cpp index 3efb2da8b..a1ae03b04 100644 --- a/src/gui/components/cc_frm.cpp +++ b/src/gui/components/cc_frm.cpp @@ -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)