gitlab #535
Change-Id: Ia4e8a0389659ce115d9cfb8febc23be0061fe3be
if (hasState(STATE_EDITING))
return;
- this.text = new String(text != null ? text : "");
+ this.text = text;
this.font = font;
this.color = color;
this.scale = scale;
// no value => value
if(this.text == null && text != null) NodeUtil.decreasePending(this);
- this.text = text != null ? text : "";
- caret = Math.min(caret, this.text.length());
+ this.text = text;
+ caret = text != null ? Math.min(caret, text.length()) : 0;
selectionTail = caret;
resetCaches();