Explorar el Código

Fix visible_lines calculation

helviett hace 2 años
padre
commit
ceee405cec
Se han modificado 1 ficheros con 1 adiciones y 4 borrados
  1. 1 4
      scene/gui/label.cpp

+ 1 - 4
scene/gui/label.cpp

@@ -209,10 +209,7 @@ bool Label::_shape() {
 
 
 				// Fill after min_size calculation.
 				// Fill after min_size calculation.
 
 
-				int visible_lines = lines_rid.size();
-				if (max_lines_visible >= 0 && visible_lines > max_lines_visible) {
-					visible_lines = max_lines_visible;
-				}
+				int visible_lines = get_visible_line_count();
 				if (autowrap_mode != TextServer::AUTOWRAP_OFF) {
 				if (autowrap_mode != TextServer::AUTOWRAP_OFF) {
 					bool lines_hidden = visible_lines > 0 && visible_lines < lines_rid.size();
 					bool lines_hidden = visible_lines > 0 && visible_lines < lines_rid.size();
 					if (lines_hidden) {
 					if (lines_hidden) {