Преглед изворни кода

Merge pull request #227 from CIB/cleanup

Fix issue #226
Ivan Safrin пре 12 година
родитељ
комит
05fcffc22a
1 измењених фајлова са 5 додато и 0 уклоњено
  1. 5 0
      Modules/Contents/UI/Source/PolyUITextInput.cpp

+ 5 - 0
Modules/Contents/UI/Source/PolyUITextInput.cpp

@@ -1055,6 +1055,11 @@ void UITextInput::Paste() {
 }
 
 void UITextInput::showLine(unsigned int lineNumber, bool top) {
+	// If there's no scroll container, no need to adjust the line.
+	if(!multiline) {
+		return;
+	}
+
 	if(top) {
 		scrollContainer->setScrollValue(0.0, ((((lineNumber) * ((lineHeight+lineSpacing)))) + padding)/(scrollContainer->getContentSize().y-scrollContainer->getHeight()));
 	} else {