Fix textbox selection when deleting
See https://forum.flaxengine.com/t/renaming-items-in-the-content-area-problem/334
This commit is contained in:
@@ -620,8 +620,10 @@ namespace FlaxEngine.GUI
|
|||||||
{
|
{
|
||||||
var left = SelectionLeft >= 0 ? SelectionLeft : 0;
|
var left = SelectionLeft >= 0 ? SelectionLeft : 0;
|
||||||
if (HasSelection)
|
if (HasSelection)
|
||||||
|
{
|
||||||
_text = _text.Remove(left, selectionLength);
|
_text = _text.Remove(left, selectionLength);
|
||||||
|
SetSelection(left);
|
||||||
|
}
|
||||||
_text = _text.Insert(left, str);
|
_text = _text.Insert(left, str);
|
||||||
|
|
||||||
SetSelection(left + str.Length);
|
SetSelection(left + str.Length);
|
||||||
|
|||||||
Reference in New Issue
Block a user