Browse Source

Merge pull request #14014 from kosz78/scroll-container-fix

Fix scroll enabled in case of content fit in scroll container
Rémi Verschelde 7 years ago
parent
commit
b3b4727dff
1 changed files with 2 additions and 0 deletions
  1. 2 0
      scene/gui/scroll_container.cpp

+ 2 - 0
scene/gui/scroll_container.cpp

@@ -354,6 +354,7 @@ void ScrollContainer::update_scrollbars() {
 	if (!scroll_v || min.height <= size.height - hmin.height) {
 
 		v_scroll->hide();
+		v_scroll->set_max(0);
 		scroll.y = 0;
 	} else {
 
@@ -366,6 +367,7 @@ void ScrollContainer::update_scrollbars() {
 	if (!scroll_h || min.width <= size.width - vmin.width) {
 
 		h_scroll->hide();
+		h_scroll->set_max(0);
 		scroll.x = 0;
 	} else {