aboutsummaryrefslogtreecommitdiff
path: root/src/Body.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Body.cpp')
-rw-r--r--src/Body.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Body.cpp b/src/Body.cpp
index 74646fd..2cf6f78 100644
--- a/src/Body.cpp
+++ b/src/Body.cpp
@@ -453,10 +453,11 @@ namespace QuickMedia {
float item_height = get_item_height(item.get(), size.x);
prev_pos.y -= (item_height + spacing_y);
- if(prev_pos.y + item_height + spacing_y <= start_y) {
+ if(prev_pos.y < start_y)
items_cut_off = true;
+
+ if(prev_pos.y + item_height + spacing_y <= start_y)
break;
- }
// This is needed here rather than above the loop, since update_dirty_text cant be called inside scissor because it corrupts the text for some reason
glEnable(GL_SCISSOR_TEST);
@@ -495,6 +496,7 @@ namespace QuickMedia {
if(after_pos.y - start_y > size.y) {
last_item_fully_visible = false;
+ items_cut_off = true;
} else {
last_fully_visible_item = i;
}