Selaa lähdekoodia

Fixed copy in UITextInput multiline

Ivan Safrin 13 vuotta sitten
vanhempi
sitoutus
1eb89a31fc
1 muutettua tiedostoa jossa 3 lisäystä ja 2 poistoa
  1. 3 2
      Modules/Contents/UI/Source/PolyUITextInput.cpp

+ 3 - 2
Modules/Contents/UI/Source/PolyUITextInput.cpp

@@ -924,9 +924,10 @@ String UITextInput::getSelectionText() {
 	}
 	}
 	
 	
 	if(selectionBottom > selectionTop+1) {
 	if(selectionBottom > selectionTop+1) {
-		for(int i=selectionTop+1; i <= selectionBottom; i++) {
+		for(int i=selectionTop+1; i < selectionBottom; i++) {
 			totalText += lines[i];
 			totalText += lines[i];
-			totalText += L"\n";
+			if(i != selectionBottom-1)
+				totalText += L"\n";
 		}
 		}
 	}
 	}