summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVBS <vdtizen.sds@samsung.com>2015-01-12 11:51:41 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2015-01-12 11:51:42 +0900
commit266bdc2f40acb4b772b75759e014f85710525ea8 (patch)
treeae34063a6c35330eeb29b56e39547349ffc363da
parentd6f4040d0c62c220f2339d2a57126fde43e85e19 (diff)
Scroller : Fix elm_scroller_last_page_get API wrong return value
Summary: When first page is last page, elm_scroller_last_page_get need to return 0. But if pagesize is bigger then current content height or width, value will be returned -1. So fix this cases to return 0. Test Plan: If set elm_scroller_page_set bigger then current content size, then issue is occurred. Reviewers: seoz, jaehwan, raster Reviewed By: raster Subscribers: eagleeye Differential Revision: https://phab.enlightenment.org/D1860
-rw-r--r--src/lib/elm_interface_scrollable.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/elm_interface_scrollable.c b/src/lib/elm_interface_scrollable.c
index 3c8db9229..d1b818aeb 100644
--- a/src/lib/elm_interface_scrollable.c
+++ b/src/lib/elm_interface_scrollable.c
@@ -4180,14 +4180,14 @@ _elm_interface_scrollable_last_page_get(Eo *obj EINA_UNUSED, Elm_Scrollable_Smar
4180 eo_do(sid->pan_obj, elm_obj_pan_content_size_get(&cw, &ch)); 4180 eo_do(sid->pan_obj, elm_obj_pan_content_size_get(&cw, &ch));
4181 if (pagenumber_h) 4181 if (pagenumber_h)
4182 { 4182 {
4183 if (sid->pagesize_h > 0) 4183 if ((sid->pagesize_h > 0) && (cw > sid->pagesize_h))
4184 *pagenumber_h = cw / sid->pagesize_h - 1; 4184 *pagenumber_h = cw / sid->pagesize_h - 1;
4185 else 4185 else
4186 *pagenumber_h = 0; 4186 *pagenumber_h = 0;
4187 } 4187 }
4188 if (pagenumber_v) 4188 if (pagenumber_v)
4189 { 4189 {
4190 if (sid->pagesize_v > 0) 4190 if ((sid->pagesize_v > 0) && (ch > sid->pagesize_v))
4191 *pagenumber_v = ch / sid->pagesize_v - 1; 4191 *pagenumber_v = ch / sid->pagesize_v - 1;
4192 else 4192 else
4193 *pagenumber_v = 0; 4193 *pagenumber_v = 0;