Explorar el Código

When pasting text to an input box properly clear the currently selected text first

BearishSun hace 10 años
padre
commit
e36752c216
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3 1
      BansheeEngine/Source/BsGUIInputBox.cpp

+ 3 - 1
BansheeEngine/Source/BsGUIInputBox.cpp

@@ -1229,8 +1229,10 @@ namespace BansheeEngine
 
 	void GUIInputBox::pasteText()
 	{
-		WString textInClipboard = PlatformUtility::copyFromClipboard();
+		if (mSelectionShown)
+			deleteSelectedText(true);
 
+		WString textInClipboard = PlatformUtility::copyFromClipboard();
 		UINT32 charIdx = gGUIManager().getInputCaretTool()->getCharIdxAtCaretPos();
 
 		bool filterOkay = true;